]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Include cython in the sdist package
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 11 May 2020 05:34:22 +0000 (17:34 +1200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 11 May 2020 06:13:33 +0000 (18:13 +1200)
Also fixed everything else that should be needed to test the C
implementation on travis.

.gitignore
MANIFEST.in [new file with mode: 0644]
setup.py
tox.ini

index 4d5e6f253c6d352148189bdbc296015619e73a66..5b258ce7b69a78ee31d76af506bc17c60181e559 100644 (file)
@@ -3,3 +3,4 @@ env
 /.tox
 /.eggs
 /build
+/dist
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644 (file)
index 0000000..10984ce
--- /dev/null
@@ -0,0 +1,2 @@
+include README.rst LICENSE.txt BACKERS.md tox.ini
+recursive-include psycopg3 *.pyx *.pxd
index 084e9ba81754dea1176edd655432bccd4753ed37..22ab0c46b5849bbf90b605d750d44fd628acd245 100644 (file)
--- 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 1cc1bae89e0fd69c781e209c496a4d32135ac77e..cb0d47a6cb22da61f0eb3199e3a41ce7ccc2439a 100644 (file)
--- 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]