From eda15ebad75b1e7bf6996f712445d879ed00fcbf Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Fri, 13 Sep 2019 11:14:55 -0500 Subject: [PATCH 1/8] sdist cleanup --- setup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 493254e5329bf..fc1510a111586 100755 --- a/setup.py +++ b/setup.py @@ -524,12 +524,10 @@ def maybe_cythonize(extensions, *args, **kwargs): """ Render tempita templates before calling cythonize """ - if len(sys.argv) > 1 and "clean" in sys.argv: + if "clean" in sys.argv or "sdist" in sys.argv: # Avoid running cythonize on `python setup.py clean` # See https://github.com/cython/cython/issues/1495 return extensions - elif "sdist" in sys.argv: - return extensions numpy_incl = pkg_resources.resource_filename("numpy", "core/include") # TODO: Is this really necessary here? From 50bc779f34a6196d1032da259d84b9705f4d878d Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Fri, 13 Sep 2019 11:14:55 -0500 Subject: [PATCH 2/8] sdist cleanup --- MANIFEST.in | 4 ++++ setup.py | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index d82e64d0a68b8..adaad1dc1c864 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -15,6 +15,7 @@ graft pandas global-exclude *.bz2 global-exclude *.csv global-exclude *.dta +global-exclude *.feather global-exclude *.gz global-exclude *.h5 global-exclude *.html @@ -24,7 +25,10 @@ global-exclude *.pickle global-exclude *.png global-exclude *.pyc global-exclude *.pyd +global-exclude *.ods +global-exclude *.odt global-exclude *.sas7bdat +global-exclude *.sav global-exclude *.so global-exclude *.xls global-exclude *.xlsm diff --git a/setup.py b/setup.py index 493254e5329bf..fc1510a111586 100755 --- a/setup.py +++ b/setup.py @@ -524,12 +524,10 @@ def maybe_cythonize(extensions, *args, **kwargs): """ Render tempita templates before calling cythonize """ - if len(sys.argv) > 1 and "clean" in sys.argv: + if "clean" in sys.argv or "sdist" in sys.argv: # Avoid running cythonize on `python setup.py clean` # See https://github.com/cython/cython/issues/1495 return extensions - elif "sdist" in sys.argv: - return extensions numpy_incl = pkg_resources.resource_filename("numpy", "core/include") # TODO: Is this really necessary here? From 6525f511fff14014a86e88fde87ab64094137624 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Fri, 13 Sep 2019 11:34:41 -0500 Subject: [PATCH 3/8] feather skips --- pandas/tests/io/test_feather.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandas/tests/io/test_feather.py b/pandas/tests/io/test_feather.py index ee668d6890756..17c42a298c1e6 100644 --- a/pandas/tests/io/test_feather.py +++ b/pandas/tests/io/test_feather.py @@ -4,6 +4,8 @@ import numpy as np import pytest +import pandas.util._test_decorators as td + import pandas as pd import pandas.util.testing as tm from pandas.util.testing import assert_frame_equal, ensure_clean @@ -17,6 +19,7 @@ @pytest.mark.single +@td.skip_if_no("pyarrow", min_version="0.15.0") # Sparse class TestFeather: def check_error_on_write(self, df, exc): # check that we are raising the exception From 845466fec55483cd8b206993e2d690e53ee94e57 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Mon, 16 Sep 2019 07:49:55 -0500 Subject: [PATCH 4/8] update comment --- setup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index fc1510a111586..7040147c2b741 100755 --- a/setup.py +++ b/setup.py @@ -522,10 +522,12 @@ def run(self): # re-compile. def maybe_cythonize(extensions, *args, **kwargs): """ - Render tempita templates before calling cythonize + Render tempita templates before calling cythonize. This is skipped for + + * clean + * sdist """ if "clean" in sys.argv or "sdist" in sys.argv: - # Avoid running cythonize on `python setup.py clean` # See https://github.com/cython/cython/issues/1495 return extensions From 9ba4a938e526ce3295f618744a1726311ad15e4a Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Mon, 16 Sep 2019 07:57:24 -0500 Subject: [PATCH 5/8] conflict --- pandas/tests/io/test_feather.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/pandas/tests/io/test_feather.py b/pandas/tests/io/test_feather.py index 17c42a298c1e6..ee668d6890756 100644 --- a/pandas/tests/io/test_feather.py +++ b/pandas/tests/io/test_feather.py @@ -4,8 +4,6 @@ import numpy as np import pytest -import pandas.util._test_decorators as td - import pandas as pd import pandas.util.testing as tm from pandas.util.testing import assert_frame_equal, ensure_clean @@ -19,7 +17,6 @@ @pytest.mark.single -@td.skip_if_no("pyarrow", min_version="0.15.0") # Sparse class TestFeather: def check_error_on_write(self, df, exc): # check that we are raising the exception From cee1aa7065aa8985c1c5c792d35945c955062f21 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Mon, 16 Sep 2019 10:14:07 -0500 Subject: [PATCH 6/8] note --- doc/source/whatsnew/v1.0.0.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/source/whatsnew/v1.0.0.rst b/doc/source/whatsnew/v1.0.0.rst index c78e27f098f13..58466634cf213 100644 --- a/doc/source/whatsnew/v1.0.0.rst +++ b/doc/source/whatsnew/v1.0.0.rst @@ -231,6 +231,8 @@ Build Changes ^^^^^^^^^^^^^ - Fixed pyqt development dependency issue because of different pyqt package name in conda and PyPI (:issue:`26838`) - Added a `pyproject.toml `_ file (:issue:`20775`) +- Pandas no longer includes cythonized C files in the source distribution uploaded to PyPI. As long as the version of ``pip`` + supports reading a ``pyproject.toml``, no changes should be required in the build environment. The does not affect users installing wheels (:issue:`28341`). ExtensionArray From 08408e88843d892ebdfb0872042337954da59d16 Mon Sep 17 00:00:00 2001 From: Tom Augspurger Date: Mon, 16 Sep 2019 15:19:01 -0500 Subject: [PATCH 7/8] move out of bug fixes --- doc/source/whatsnew/v1.0.0.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/source/whatsnew/v1.0.0.rst b/doc/source/whatsnew/v1.0.0.rst index 58466634cf213..1cc3516e45ac3 100644 --- a/doc/source/whatsnew/v1.0.0.rst +++ b/doc/source/whatsnew/v1.0.0.rst @@ -37,6 +37,15 @@ Other enhancements (:issue:`28368`) - + +Build Changes +^^^^^^^^^^^^^ + +Pandas has added a `pyproject.toml `_ file and will no longer include +cythonized files in the source distribution uploaded to PyPI (:issue:`28341`, :issue:`20775`). If you're installing +a built distribution (wheel) or via conda, this shouldn't have any effect on you. If you're building pandas from +source, you should not longer need to install Cython into your build environment before calling ``pip install pandas``. + .. _whatsnew_1000.api_breaking: Backwards incompatible API changes @@ -226,15 +235,6 @@ Sparse - - - -Build Changes -^^^^^^^^^^^^^ -- Fixed pyqt development dependency issue because of different pyqt package name in conda and PyPI (:issue:`26838`) -- Added a `pyproject.toml `_ file (:issue:`20775`) -- Pandas no longer includes cythonized C files in the source distribution uploaded to PyPI. As long as the version of ``pip`` - supports reading a ``pyproject.toml``, no changes should be required in the build environment. The does not affect users installing wheels (:issue:`28341`). - - ExtensionArray ^^^^^^^^^^^^^^ From 312f0de1ee6fc66e1fdfad83bdcc6ee18c24f332 Mon Sep 17 00:00:00 2001 From: William Ayd Date: Mon, 16 Sep 2019 17:11:52 -0700 Subject: [PATCH 8/8] Update v1.0.0.rst --- doc/source/whatsnew/v1.0.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/whatsnew/v1.0.0.rst b/doc/source/whatsnew/v1.0.0.rst index 1cc3516e45ac3..90e89168cd580 100644 --- a/doc/source/whatsnew/v1.0.0.rst +++ b/doc/source/whatsnew/v1.0.0.rst @@ -44,7 +44,7 @@ Build Changes Pandas has added a `pyproject.toml `_ file and will no longer include cythonized files in the source distribution uploaded to PyPI (:issue:`28341`, :issue:`20775`). If you're installing a built distribution (wheel) or via conda, this shouldn't have any effect on you. If you're building pandas from -source, you should not longer need to install Cython into your build environment before calling ``pip install pandas``. +source, you should no longer need to install Cython into your build environment before calling ``pip install pandas``. .. _whatsnew_1000.api_breaking: