This commit introduces a pre-commit config, which checks all
Python files via black (a code foramtter) and flake8 (a style
checker).
This commit also updates all python files after reformatting
by black (obtained by running "pre-commit run --all").
One thing this commit does not do, however, is make any manual
change. In particular, this commit does not address the errors
reported by flake8.
In the Alire index we have one crate for each of the GNATColl DB
libraries (xref, sql, sqlite, postgres). They all come from the same
repository but use different checkouts. The result is that the
"gnatcoll_db_shared.gpr" is found multiple times in the closure of a
project, e.g. for gnatcoll_xref that depends on gnatcoll_sqlite and
gnatcoll_sql. This result in an error from gprbuild.
To circumvent the issue, this patch duplicates gnatcoll_db_shared.gpr in
each of the sql, sqlite, xref and postgres folders with a different name
for each.
Part of V826-023.
Change-Id: I9058e5f88fa307806c483c02d3c0de7298018821
Remove the Name variable, which duplicates an attribute.
Replace hardcoded Mains with Name.
Remove transitional Library_Type variable from library projects.
Make explicit that Library_Version is only useful during relocatable
builds.
Compute Library_Version from Library_Name, in case it ever differs
from Name.
Make the list of possible Library_Type values explicit (the
documentation mentions "dynamic").
Reorder case statements in order to use Sqlite_Lib in a way similar to
the existing Thread_Lib.
When OS /= Windows_NT, GNATCOLL_SQLITE = embedded, LIBRARY_TYPE = relocatable,
Library_Options is now ("-pthread") instead of (),
consistently with Linker'Linker_Options.
When GNATCOLL_SQLITE = external, LIBRARY_TYPE = static,
Library_Options is now () instead of ("-lsqlite3") & Thread_Lib.
These options are intended for the dynamic loader, not the static
archiver (see https://github.com/AdaCore/gnatcoll-db/pull/17).