Allow to specify psycopg* in extras and switch to build (#2907)

* remove check_psycopg() call from the setup.py, when installing from wheel it doesn't work anyway.
* call check_psycopg() function before process_arguments(), because the last one is trying to import psycopg and fails with the stacktrace, while the first one shows a nice human-readable error message.
* add psycopg2, psycopg2-binary, and psycopg3 extras, that will install psycopg2>=2.5.4, psycopg2-binary, or psycopg[binary]>=3.0.0 modules respectively.
* move check_psycopg() function to the __main__.py.
* introduce the new extra called `all`, it will allow to install all dependencies at once (except psycopg related).
* use the `build` module in order to create sdist bdist_wheel packages.
* update the documentation regarding psycopg and extras (dependencies).
This commit is contained in:
Alexander Kukushkin
2023-10-17 14:46:15 +02:00
committed by GitHub
parent 60d8bc3a70
commit fc67ba73f0
7 changed files with 112 additions and 119 deletions
+4 -1
View File
@@ -24,8 +24,11 @@ jobs:
- name: Run tests and flake8
run: python .github/workflows/run_tests.py
- name: Install Python packaging build frontend
run: python -m pip install build
- name: Build a binary wheel and a source tarball
run: python setup.py sdist bdist_wheel
run: python -m build
- name: Publish distribution to Test PyPI
if: github.event_name == 'push'