From 6f161e64a91c1e066af9f31e93f66213eb93c1aa Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Mon, 11 May 2020 17:34:22 +1200 Subject: [PATCH] Include cython in the sdist package Also fixed everything else that should be needed to test the C implementation on travis. --- .gitignore | 1 + MANIFEST.in | 2 ++ setup.py | 7 ++++--- tox.ini | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 MANIFEST.in diff --git a/.gitignore b/.gitignore index 4d5e6f253..5b258ce7b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ env /.tox /.eggs /build +/dist diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 000000000..10984ce53 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include README.rst LICENSE.txt BACKERS.md tox.ini +recursive-include psycopg3 *.pyx *.pxd diff --git a/setup.py b/setup.py index 084e9ba81..22ab0c46b 100644 --- a/setup.py +++ b/setup.py @@ -66,7 +66,7 @@ class our_build_ext(build_ext): # type: ignore ["pg_config", f"--includedir"], stdout=sp.PIPE, check=True ) except Exception as e: - log.warn("cannot build C module: %s", (e,)) + log.warn("cannot build C module: %s", e) return includedir = out.stdout.strip().decode("utf8") @@ -100,9 +100,10 @@ setup( python_requires=">=3.6", packages=find_packages(exclude=["tests"]), classifiers=[x for x in classifiers.split("\n") if x], - setup_requires=["Cython"], - install_requires=["Cython", "typing_extensions"], + setup_requires=["Cython>=3.0a2"], + install_requires=["typing_extensions"], zip_safe=False, + include_package_data=True, version=version, project_urls={ "Homepage": "https://psycopg.org/", diff --git a/tox.ini b/tox.ini index 1cc1bae89..cb0d47a6c 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ envlist = py{36,37,38}, black, flake8, mypy [testenv] commands = pytest {posargs} -passenv = PG* PSYCOPG3_TEST_DSN +passenv = PG* PSYCOPG3_TEST_DSN PYTEST_ADDOPTS deps = pytest >= 5.3,<6 [testenv:black] -- 2.47.2