Skip to content

Commit 55294ca

Browse files
committed
BLD: Stop shipping cythonized files in sdist
* Adds pyproject.toml to support this. * Bumps minimum Cython version to the version supporting Python 3.8. Closes pandas-dev#28341
1 parent 2164af5 commit 55294ca

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

MANIFEST.in

+7-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,18 @@ include LICENSE
33
include RELEASE.md
44
include README.md
55
include setup.py
6+
include pyproject.toml
67

78
graft doc
8-
prune doc/build
9-
109
graft LICENSES
11-
1210
graft pandas
1311

12+
prune doc/build
13+
prune asv_bench
14+
prune ci
15+
prune conda.recipe
16+
prune scripts
17+
1418
global-exclude *.bz2
1519
global-exclude *.csv
1620
global-exclude *.dta

pyproject.toml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[build-system]
2+
# Minimum requirements for the build system to execute.
3+
requires = [
4+
"setuptools",
5+
"wheel",
6+
"Cython>=0.29.13", # Note: sync with setup.py
7+
"numpy==1.13.3; python_version=='3.5' and platform_system!='AIX'",
8+
"numpy==1.13.3; python_version=='3.6' and platform_system!='AIX'",
9+
"numpy==1.14.5; python_version>='3.7' and platform_system!='AIX'",
10+
"numpy==1.16.0; python_version=='3.5' and platform_system=='AIX'",
11+
"numpy==1.16.0; python_version=='3.6' and platform_system=='AIX'",
12+
"numpy==1.16.0; python_version>='3.7' and platform_system=='AIX'",
13+
]

setup.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def is_platform_mac():
4343
}
4444

4545

46-
min_cython_ver = "0.28.2"
46+
min_cython_ver = "0.29.13" # Note: sync with pyproject.toml
4747
try:
4848
import Cython
4949

@@ -367,7 +367,7 @@ def initialize_options(self):
367367
def run(self):
368368
if "cython" in cmdclass:
369369
self.run_command("cython")
370-
else:
370+
elif "sdist" not in sys.argv:
371371
# If we are not running cython then
372372
# compile the extensions correctly
373373
pyx_files = [(self._pyxfiles, "c"), (self._cpp_pyxfiles, "cpp")]
@@ -532,6 +532,8 @@ def maybe_cythonize(extensions, *args, **kwargs):
532532
# https://github.com/pandas-dev/pandas/issues/25193
533533
# TODO: See if this can be removed after pyproject.toml added.
534534
return extensions
535+
elif "sdist" in sys.argv:
536+
return extensions
535537

536538
numpy_incl = pkg_resources.resource_filename("numpy", "core/include")
537539
# TODO: Is this really necessary here?

0 commit comments

Comments
 (0)