From c1012aa5302c6d21c116812b9faf7e5078c1a0c1 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Mon, 23 Nov 2020 09:50:58 +0000 Subject: [PATCH 01/12] test wheel build status in advance of 1.1.5 release --- .travis.yml | 2 +- azure/posix.yml | 2 +- azure/windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f3d3ade..d3b859b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ env: global: - REPO_DIR=pandas # on release change this to a version - - BUILD_COMMIT="v1.1.4" + - BUILD_COMMIT="1.1.x" - UNICODE_WIDTH=32 - PLAT=aarch64 - NP_BUILD_DEP="numpy==1.13.3" diff --git a/azure/posix.yml b/azure/posix.yml index 053372d..47a8c6f 100644 --- a/azure/posix.yml +++ b/azure/posix.yml @@ -9,7 +9,7 @@ jobs: vmImage: ${{ parameters.vmImage }} variables: REPO_DIR: "pandas" - BUILD_COMMIT: "v1.1.4" + BUILD_COMMIT: "1.1.x" PLAT: "x86_64" NP_BUILD_DEP: "numpy==1.13.3" CYTHON_BUILD_DEP: "cython==0.29.21" diff --git a/azure/windows.yml b/azure/windows.yml index cfc8742..a610920 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -8,7 +8,7 @@ jobs: pool: vmImage: ${{ parameters.vmImage }} variables: - BUILD_COMMIT: "v1.1.4" + BUILD_COMMIT: "1.1.x" NP_BUILD_DEP: "1.13.3" CYTHON_BUILD_DEP: "0.29.21" NIGHTLY_BUILD_COMMIT: "master" From 10254dedd94aafc63342d6682d998c6d951ca9a4 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Tue, 24 Nov 2020 11:33:57 +0000 Subject: [PATCH 02/12] test if change NP_BUILD_DEP for 3.7 affects 1.1.x --- azure-pipelines.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3467593..f8b8a05 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,7 +11,7 @@ trigger: - master pr: -- master +- master jobs: - template: azure/windows.yml @@ -30,12 +30,12 @@ jobs: py_3.7_32: PYTHON_VERSION: "3.7" PYTHON_ARCH: "x86" - NP_BUILD_DEP: "1.14.5" + NP_BUILD_DEP: "1.16.5" NIGHTLY_BUILD: "true" py_3.7_64: PYTHON_VERSION: "3.7" PYTHON_ARCH: "x64" - NP_BUILD_DEP: "1.14.5" + NP_BUILD_DEP: "1.16.5" NIGHTLY_BUILD: "true" py_3.8_32: PYTHON_VERSION: "3.8" @@ -71,11 +71,11 @@ jobs: py_3.7_32: MB_PYTHON_VERSION: "3.7" PLAT: "i686" - NP_BUILD_DEP: "numpy==1.14.5" + NP_BUILD_DEP: "numpy==1.16.5" NIGHTLY_BUILD: "true" py_3.7_64: MB_PYTHON_VERSION: "3.7" - NP_BUILD_DEP: "numpy==1.14.5" + NP_BUILD_DEP: "numpy==1.16.5" NIGHTLY_BUILD: "true" py_3.8_32: MB_PYTHON_VERSION: "3.8" @@ -107,7 +107,7 @@ jobs: NP_BUILD_DEP: "numpy==1.13.3" py_3.7_64: MB_PYTHON_VERSION: "3.7" - NP_BUILD_DEP: "numpy==1.14.5" + NP_BUILD_DEP: "numpy==1.16.5" NIGHTLY_BUILD: "true" py_3.8_64: MB_PYTHON_VERSION: "3.8" From 99b336303b7d70cf20961679dc59783696703322 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Fri, 27 Nov 2020 10:15:40 +0000 Subject: [PATCH 03/12] re-enable py37 tests --- config.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config.sh b/config.sh index e98afa2..80f6bf6 100644 --- a/config.sh +++ b/config.sh @@ -31,6 +31,5 @@ function run_tests { pip list python -c 'import pandas; pandas.show_versions()' # Skip test_maybe_promote_int_with_int: https://github.com/pandas-dev/pandas/issues/31856 - # TestPandasContainer for 3.7.0 failure - python -c 'import sys; import pandas; pandas.test(extra_args=["-m not clipboard", "--skip-slow", "--skip-network", "--skip-db", "-n=2", "-k not test_maybe_promote_int_with_int and not test_file_descriptor_leak"]) if sys.version_info[:2] != (3, 7) else None' + python -c 'import pandas; pandas.test(extra_args=["-m not clipboard", "--skip-slow", "--skip-network", "--skip-db", "-n=2", "-k not test_maybe_promote_int_with_int and not test_file_descriptor_leak"])' } From 5fe32a5f422cbb80ba7b20c6a24cc1ddb8fd8e31 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Fri, 27 Nov 2020 11:54:36 +0000 Subject: [PATCH 04/12] unpin pytest-xdist and remove skip for test_file_descriptor_leak --- azure/posix.yml | 2 +- config.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/azure/posix.yml b/azure/posix.yml index 47a8c6f..62d56cf 100644 --- a/azure/posix.yml +++ b/azure/posix.yml @@ -15,7 +15,7 @@ jobs: CYTHON_BUILD_DEP: "cython==0.29.21" NIGHTLY_BUILD_COMMIT: "master" NIGHTLY_BUILD: "false" - TEST_DEPENDS: "pytest pytest-xdist==1.* hypothesis" + TEST_DEPENDS: "pytest pytest-xdist hypothesis" TEST_DIR: "tmp_for_test" strategy: matrix: diff --git a/config.sh b/config.sh index 80f6bf6..f75c310 100644 --- a/config.sh +++ b/config.sh @@ -31,5 +31,5 @@ function run_tests { pip list python -c 'import pandas; pandas.show_versions()' # Skip test_maybe_promote_int_with_int: https://github.com/pandas-dev/pandas/issues/31856 - python -c 'import pandas; pandas.test(extra_args=["-m not clipboard", "--skip-slow", "--skip-network", "--skip-db", "-n=2", "-k not test_maybe_promote_int_with_int and not test_file_descriptor_leak"])' + python -c 'import pandas; pandas.test(extra_args=["-m not clipboard", "--skip-slow", "--skip-network", "--skip-db", "-n=2", "-k not test_maybe_promote_int_with_int"])' } From c919e84b131f3d9a95e490059954b318fe8f03d8 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Fri, 27 Nov 2020 14:28:55 +0000 Subject: [PATCH 05/12] remove skip for test_maybe_promote_int_with_int --- config.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config.sh b/config.sh index f75c310..e1b1a7c 100644 --- a/config.sh +++ b/config.sh @@ -30,6 +30,5 @@ function run_tests { which -a python pip list python -c 'import pandas; pandas.show_versions()' - # Skip test_maybe_promote_int_with_int: https://github.com/pandas-dev/pandas/issues/31856 - python -c 'import pandas; pandas.test(extra_args=["-m not clipboard", "--skip-slow", "--skip-network", "--skip-db", "-n=2", "-k not test_maybe_promote_int_with_int"])' + python -c 'import pandas; pandas.test(extra_args=["-m not clipboard", "--skip-slow", "--skip-network", "--skip-db", "-n=2"])' } From 08136a7e5dd76208c9efb9d36e2319a67d8fcc34 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Sat, 5 Dec 2020 18:50:40 +0000 Subject: [PATCH 06/12] debug --- azure/windows.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/azure/windows.yml b/azure/windows.yml index a610920..9ac4dd1 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -70,9 +70,13 @@ jobs: pushd pandas cp "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Redist/MSVC/14.16.27012/$PYTHON_ARCH/Microsoft.VC141.CRT/msvcp140.dll" pandas/_libs/window cp "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Redist/MSVC/14.16.27012/$PYTHON_ARCH/Microsoft.VC141.CRT/concrt140.dll" pandas/_libs/window + echo "running python setup.py build" python setup.py build + echo "running python setup.py bdist_wheel" python setup.py bdist_wheel + echo "running ls dist" ls dist + echo "running twine check dist/*" twine check dist/* popd displayName: Build wheel From feff674b97f48489923ce4e82fa2d61724da9b11 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Sat, 5 Dec 2020 21:46:41 +0000 Subject: [PATCH 07/12] pin wheel --- azure/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure/windows.yml b/azure/windows.yml index 9ac4dd1..9815921 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -66,7 +66,7 @@ jobs: set -e pip install --timeout=60 numpy==$NP_BUILD_DEP pip install --timeout=60 $TEST_DEPENDS Cython==$CYTHON_BUILD_DEP - pip install twine wheel + pip install twine wheel==0.36.0 pushd pandas cp "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Redist/MSVC/14.16.27012/$PYTHON_ARCH/Microsoft.VC141.CRT/msvcp140.dll" pandas/_libs/window cp "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Redist/MSVC/14.16.27012/$PYTHON_ARCH/Microsoft.VC141.CRT/concrt140.dll" pandas/_libs/window From 7d0055642d72d2f2bcbb81ca8370f87312f0ff02 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Sat, 5 Dec 2020 23:08:15 +0000 Subject: [PATCH 08/12] debug --- azure/windows.yml | 3 ++- patch.diff | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 patch.diff diff --git a/azure/windows.yml b/azure/windows.yml index 9815921..813d808 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -66,8 +66,9 @@ jobs: set -e pip install --timeout=60 numpy==$NP_BUILD_DEP pip install --timeout=60 $TEST_DEPENDS Cython==$CYTHON_BUILD_DEP - pip install twine wheel==0.36.0 + pip install twine wheel pushd pandas + git apply ../patch.diff cp "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Redist/MSVC/14.16.27012/$PYTHON_ARCH/Microsoft.VC141.CRT/msvcp140.dll" pandas/_libs/window cp "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Redist/MSVC/14.16.27012/$PYTHON_ARCH/Microsoft.VC141.CRT/concrt140.dll" pandas/_libs/window echo "running python setup.py build" diff --git a/patch.diff b/patch.diff new file mode 100644 index 0000000..c4e3fbb --- /dev/null +++ b/patch.diff @@ -0,0 +1,30 @@ +diff --git a/setup.py b/setup.py +index 915847c293..1c5b054d88 100755 +--- a/setup.py ++++ b/setup.py +@@ -16,7 +16,7 @@ import platform + import shutil + import sys + +-import pkg_resources ++# import pkg_resources + from setuptools import Command, find_packages, setup + + # versioning +@@ -519,11 +519,11 @@ def maybe_cythonize(extensions, *args, **kwargs): + ) + raise RuntimeError("Cannot cythonize without Cython installed.") + +- numpy_incl = pkg_resources.resource_filename("numpy", "core/include") +- # TODO: Is this really necessary here? +- for ext in extensions: +- if hasattr(ext, "include_dirs") and numpy_incl not in ext.include_dirs: +- ext.include_dirs.append(numpy_incl) ++ # numpy_incl = pkg_resources.resource_filename("numpy", "core/include") ++ # # TODO: Is this really necessary here? ++ # for ext in extensions: ++ # if hasattr(ext, "include_dirs") and numpy_incl not in ext.include_dirs: ++ # ext.include_dirs.append(numpy_incl) + + # reuse any parallel arguments provided for compilation to cythonize + parser = argparse.ArgumentParser() From 5cf9fbc6a4d91b36e71feaf704ec3e6ee54e1cfb Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Sat, 5 Dec 2020 23:36:49 +0000 Subject: [PATCH 09/12] debug --- patch.diff | 158 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 146 insertions(+), 12 deletions(-) diff --git a/patch.diff b/patch.diff index c4e3fbb..c2881cb 100644 --- a/patch.diff +++ b/patch.diff @@ -1,17 +1,122 @@ diff --git a/setup.py b/setup.py -index 915847c293..1c5b054d88 100755 +index 915847c293..e148b6d445 100755 --- a/setup.py +++ b/setup.py -@@ -16,7 +16,7 @@ import platform +@@ -7,6 +7,7 @@ BSD license. Parts are from lxml (https://github.com/lxml/lxml) + """ + + import argparse ++from distutils.command.build import build + from distutils.sysconfig import get_config_vars + from distutils.version import LooseVersion + import multiprocessing +@@ -16,10 +17,10 @@ import platform import shutil import sys -import pkg_resources -+# import pkg_resources - from setuptools import Command, find_packages, setup +-from setuptools import Command, find_packages, setup ++import numpy ++from setuptools import Command, Extension, find_packages, setup ++from setuptools.command.build_ext import build_ext as _build_ext + +-# versioning + import versioneer + + cmdclass = versioneer.get_cmdclass() +@@ -37,9 +38,7 @@ min_numpy_ver = "1.15.4" + min_cython_ver = "0.29.21" # note: sync with pyproject.toml + + try: +- import Cython +- +- _CYTHON_VERSION = Cython.__version__ ++ from Cython import Tempita, __version__ as _CYTHON_VERSION + from Cython.Build import cythonize + + _CYTHON_INSTALLED = _CYTHON_VERSION >= LooseVersion(min_cython_ver) +@@ -48,22 +47,6 @@ except ImportError: + _CYTHON_INSTALLED = False + cythonize = lambda x, *args, **kwargs: x # dummy func + +-# The import of Extension must be after the import of Cython, otherwise +-# we do not get the appropriately patched class. +-# See https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html # noqa +-from distutils.extension import Extension # noqa: E402 isort:skip +-from distutils.command.build import build # noqa: E402 isort:skip +- +-if _CYTHON_INSTALLED: +- from Cython.Distutils.old_build_ext import old_build_ext as _build_ext +- +- cython = True +- from Cython import Tempita as tempita +-else: +- from distutils.command.build_ext import build_ext as _build_ext +- +- cython = False +- + + _pxi_dep_template = { + "algos": ["_libs/algos_common_helper.pxi.in", "_libs/algos_take_helper.pxi.in"], +@@ -101,7 +84,7 @@ class build_ext(_build_ext): + + with open(pxifile, "r") as f: + tmpl = f.read() +- pyxcontent = tempita.sub(tmpl) ++ pyxcontent = Tempita.sub(tmpl) + + with open(outfile, "w") as f: + f.write(pyxcontent) +@@ -109,7 +92,7 @@ class build_ext(_build_ext): + def build_extensions(self): + # if building from c files, don't need to + # generate template output +- if cython: ++ if _CYTHON_INSTALLED: + self.render_templates(_pxifiles) + + super().build_extensions() +@@ -406,7 +389,7 @@ class DummyBuildSrc(Command): + cmdclass.update({"clean": CleanCommand, "build": build}) + cmdclass["build_ext"] = CheckingBuildExt - # versioning -@@ -519,11 +519,11 @@ def maybe_cythonize(extensions, *args, **kwargs): +-if cython: ++if _CYTHON_INSTALLED: + suffix = ".pyx" + cmdclass["cython"] = CythonCommand + else: +@@ -480,18 +463,10 @@ if linetrace: + directives["linetrace"] = True + macros = [("CYTHON_TRACE", "1"), ("CYTHON_TRACE_NOGIL", "1")] + +-# in numpy>=1.16.0, silence build warnings about deprecated API usage +-# we can't do anything about these warnings because they stem from +-# cython+numpy version mismatches. ++# silence build warnings about deprecated API usage ++# we can't do anything about these warnings because they stem from ++# cython+numpy version mismatches. + macros.append(("NPY_NO_DEPRECATED_API", "0")) +-if "-Werror" in extra_compile_args: +- try: +- import numpy as np +- except ImportError: +- pass +- else: +- if np.__version__ < LooseVersion("1.16.0"): +- extra_compile_args.remove("-Werror") + + + # ---------------------------------------------------------------------- +@@ -510,7 +485,7 @@ def maybe_cythonize(extensions, *args, **kwargs): + # See https://github.com/cython/cython/issues/1495 + return extensions + +- elif not cython: ++ elif not _CYTHON_INSTALLED: + # GH#28836 raise a helfpul error message + if _CYTHON_VERSION: + raise RuntimeError( +@@ -519,25 +494,12 @@ def maybe_cythonize(extensions, *args, **kwargs): ) raise RuntimeError("Cannot cythonize without Cython installed.") @@ -20,11 +125,40 @@ index 915847c293..1c5b054d88 100755 - for ext in extensions: - if hasattr(ext, "include_dirs") and numpy_incl not in ext.include_dirs: - ext.include_dirs.append(numpy_incl) -+ # numpy_incl = pkg_resources.resource_filename("numpy", "core/include") -+ # # TODO: Is this really necessary here? -+ # for ext in extensions: -+ # if hasattr(ext, "include_dirs") and numpy_incl not in ext.include_dirs: -+ # ext.include_dirs.append(numpy_incl) - +- # reuse any parallel arguments provided for compilation to cythonize parser = argparse.ArgumentParser() +- parser.add_argument("-j", type=int) +- parser.add_argument("--parallel", type=int) ++ parser.add_argument("--parallel", "-j", type=int, default=1) + parsed, _ = parser.parse_known_args() + +- nthreads = 0 +- if parsed.parallel: +- nthreads = parsed.parallel +- elif parsed.j: +- nthreads = parsed.j +- +- kwargs["nthreads"] = nthreads ++ kwargs["nthreads"] = parsed.parallel + build_ext.render_templates(_pxifiles) + return cythonize(extensions, *args, **kwargs) + +@@ -682,7 +644,8 @@ for name, data in ext_data.items(): + + sources.extend(data.get("sources", [])) + +- include = data.get("include") ++ include = data.get("include", []) ++ include.append(numpy.get_include()) + + obj = Extension( + f"pandas.{name}", +@@ -731,6 +694,7 @@ ujson_ext = Extension( + "pandas/_libs/src/ujson/python", + "pandas/_libs/src/ujson/lib", + "pandas/_libs/src/datetime", ++ numpy.get_include(), + ], + extra_compile_args=(["-D_GNU_SOURCE"] + extra_compile_args), + extra_link_args=extra_link_args, From e80f6351405dcbf3707cd5a893085f1c810eb5f3 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Sun, 6 Dec 2020 10:50:09 +0000 Subject: [PATCH 10/12] change NP_BUILD_DEP --- azure-pipelines.yml | 4 ++-- azure/windows.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3467593..2f4dab8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,11 +22,11 @@ jobs: py_3.6_32: PYTHON_VERSION: "3.6" PYTHON_ARCH: "x86" - NP_BUILD_DEP: "1.13.3" + NP_BUILD_DEP: "1.15.4" py_3.6_64: PYTHON_VERSION: "3.6" PYTHON_ARCH: "x64" - NP_BUILD_DEP: "1.13.3" + NP_BUILD_DEP: "1.15.4" py_3.7_32: PYTHON_VERSION: "3.7" PYTHON_ARCH: "x86" diff --git a/azure/windows.yml b/azure/windows.yml index 813d808..01ff89d 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -9,7 +9,7 @@ jobs: vmImage: ${{ parameters.vmImage }} variables: BUILD_COMMIT: "1.1.x" - NP_BUILD_DEP: "1.13.3" + NP_BUILD_DEP: "1.15.4" CYTHON_BUILD_DEP: "0.29.21" NIGHTLY_BUILD_COMMIT: "master" NIGHTLY_BUILD: "false" From 042e7e327365860c74cdc338304466a27032fa5a Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Mon, 7 Dec 2020 10:58:10 +0000 Subject: [PATCH 11/12] remove debug and NP_BUILD_DEP for azure --- azure-pipelines.yml | 14 ++-- azure/posix.yml | 2 +- azure/windows.yml | 5 -- patch.diff | 164 -------------------------------------------- 4 files changed, 8 insertions(+), 177 deletions(-) delete mode 100644 patch.diff diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2f4dab8..e5fed44 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,7 +11,7 @@ trigger: - master pr: -- master +- master jobs: - template: azure/windows.yml @@ -30,12 +30,12 @@ jobs: py_3.7_32: PYTHON_VERSION: "3.7" PYTHON_ARCH: "x86" - NP_BUILD_DEP: "1.14.5" + NP_BUILD_DEP: "1.15.4" NIGHTLY_BUILD: "true" py_3.7_64: PYTHON_VERSION: "3.7" PYTHON_ARCH: "x64" - NP_BUILD_DEP: "1.14.5" + NP_BUILD_DEP: "1.15.4" NIGHTLY_BUILD: "true" py_3.8_32: PYTHON_VERSION: "3.8" @@ -71,11 +71,11 @@ jobs: py_3.7_32: MB_PYTHON_VERSION: "3.7" PLAT: "i686" - NP_BUILD_DEP: "numpy==1.14.5" + NP_BUILD_DEP: "numpy==1.15.4" NIGHTLY_BUILD: "true" py_3.7_64: MB_PYTHON_VERSION: "3.7" - NP_BUILD_DEP: "numpy==1.14.5" + NP_BUILD_DEP: "numpy==1.15.4" NIGHTLY_BUILD: "true" py_3.8_32: MB_PYTHON_VERSION: "3.8" @@ -104,10 +104,10 @@ jobs: matrix: py_3.6_64: MB_PYTHON_VERSION: "3.6" - NP_BUILD_DEP: "numpy==1.13.3" + NP_BUILD_DEP: "numpy==1.15.4" py_3.7_64: MB_PYTHON_VERSION: "3.7" - NP_BUILD_DEP: "numpy==1.14.5" + NP_BUILD_DEP: "numpy==1.15.4" NIGHTLY_BUILD: "true" py_3.8_64: MB_PYTHON_VERSION: "3.8" diff --git a/azure/posix.yml b/azure/posix.yml index 62d56cf..9d0df68 100644 --- a/azure/posix.yml +++ b/azure/posix.yml @@ -11,7 +11,7 @@ jobs: REPO_DIR: "pandas" BUILD_COMMIT: "1.1.x" PLAT: "x86_64" - NP_BUILD_DEP: "numpy==1.13.3" + NP_BUILD_DEP: "numpy==1.15.4" CYTHON_BUILD_DEP: "cython==0.29.21" NIGHTLY_BUILD_COMMIT: "master" NIGHTLY_BUILD: "false" diff --git a/azure/windows.yml b/azure/windows.yml index 01ff89d..7a834c9 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -68,16 +68,11 @@ jobs: pip install --timeout=60 $TEST_DEPENDS Cython==$CYTHON_BUILD_DEP pip install twine wheel pushd pandas - git apply ../patch.diff cp "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Redist/MSVC/14.16.27012/$PYTHON_ARCH/Microsoft.VC141.CRT/msvcp140.dll" pandas/_libs/window cp "C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Redist/MSVC/14.16.27012/$PYTHON_ARCH/Microsoft.VC141.CRT/concrt140.dll" pandas/_libs/window - echo "running python setup.py build" python setup.py build - echo "running python setup.py bdist_wheel" python setup.py bdist_wheel - echo "running ls dist" ls dist - echo "running twine check dist/*" twine check dist/* popd displayName: Build wheel diff --git a/patch.diff b/patch.diff deleted file mode 100644 index c2881cb..0000000 --- a/patch.diff +++ /dev/null @@ -1,164 +0,0 @@ -diff --git a/setup.py b/setup.py -index 915847c293..e148b6d445 100755 ---- a/setup.py -+++ b/setup.py -@@ -7,6 +7,7 @@ BSD license. Parts are from lxml (https://github.com/lxml/lxml) - """ - - import argparse -+from distutils.command.build import build - from distutils.sysconfig import get_config_vars - from distutils.version import LooseVersion - import multiprocessing -@@ -16,10 +17,10 @@ import platform - import shutil - import sys - --import pkg_resources --from setuptools import Command, find_packages, setup -+import numpy -+from setuptools import Command, Extension, find_packages, setup -+from setuptools.command.build_ext import build_ext as _build_ext - --# versioning - import versioneer - - cmdclass = versioneer.get_cmdclass() -@@ -37,9 +38,7 @@ min_numpy_ver = "1.15.4" - min_cython_ver = "0.29.21" # note: sync with pyproject.toml - - try: -- import Cython -- -- _CYTHON_VERSION = Cython.__version__ -+ from Cython import Tempita, __version__ as _CYTHON_VERSION - from Cython.Build import cythonize - - _CYTHON_INSTALLED = _CYTHON_VERSION >= LooseVersion(min_cython_ver) -@@ -48,22 +47,6 @@ except ImportError: - _CYTHON_INSTALLED = False - cythonize = lambda x, *args, **kwargs: x # dummy func - --# The import of Extension must be after the import of Cython, otherwise --# we do not get the appropriately patched class. --# See https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html # noqa --from distutils.extension import Extension # noqa: E402 isort:skip --from distutils.command.build import build # noqa: E402 isort:skip -- --if _CYTHON_INSTALLED: -- from Cython.Distutils.old_build_ext import old_build_ext as _build_ext -- -- cython = True -- from Cython import Tempita as tempita --else: -- from distutils.command.build_ext import build_ext as _build_ext -- -- cython = False -- - - _pxi_dep_template = { - "algos": ["_libs/algos_common_helper.pxi.in", "_libs/algos_take_helper.pxi.in"], -@@ -101,7 +84,7 @@ class build_ext(_build_ext): - - with open(pxifile, "r") as f: - tmpl = f.read() -- pyxcontent = tempita.sub(tmpl) -+ pyxcontent = Tempita.sub(tmpl) - - with open(outfile, "w") as f: - f.write(pyxcontent) -@@ -109,7 +92,7 @@ class build_ext(_build_ext): - def build_extensions(self): - # if building from c files, don't need to - # generate template output -- if cython: -+ if _CYTHON_INSTALLED: - self.render_templates(_pxifiles) - - super().build_extensions() -@@ -406,7 +389,7 @@ class DummyBuildSrc(Command): - cmdclass.update({"clean": CleanCommand, "build": build}) - cmdclass["build_ext"] = CheckingBuildExt - --if cython: -+if _CYTHON_INSTALLED: - suffix = ".pyx" - cmdclass["cython"] = CythonCommand - else: -@@ -480,18 +463,10 @@ if linetrace: - directives["linetrace"] = True - macros = [("CYTHON_TRACE", "1"), ("CYTHON_TRACE_NOGIL", "1")] - --# in numpy>=1.16.0, silence build warnings about deprecated API usage --# we can't do anything about these warnings because they stem from --# cython+numpy version mismatches. -+# silence build warnings about deprecated API usage -+# we can't do anything about these warnings because they stem from -+# cython+numpy version mismatches. - macros.append(("NPY_NO_DEPRECATED_API", "0")) --if "-Werror" in extra_compile_args: -- try: -- import numpy as np -- except ImportError: -- pass -- else: -- if np.__version__ < LooseVersion("1.16.0"): -- extra_compile_args.remove("-Werror") - - - # ---------------------------------------------------------------------- -@@ -510,7 +485,7 @@ def maybe_cythonize(extensions, *args, **kwargs): - # See https://github.com/cython/cython/issues/1495 - return extensions - -- elif not cython: -+ elif not _CYTHON_INSTALLED: - # GH#28836 raise a helfpul error message - if _CYTHON_VERSION: - raise RuntimeError( -@@ -519,25 +494,12 @@ def maybe_cythonize(extensions, *args, **kwargs): - ) - raise RuntimeError("Cannot cythonize without Cython installed.") - -- numpy_incl = pkg_resources.resource_filename("numpy", "core/include") -- # TODO: Is this really necessary here? -- for ext in extensions: -- if hasattr(ext, "include_dirs") and numpy_incl not in ext.include_dirs: -- ext.include_dirs.append(numpy_incl) -- - # reuse any parallel arguments provided for compilation to cythonize - parser = argparse.ArgumentParser() -- parser.add_argument("-j", type=int) -- parser.add_argument("--parallel", type=int) -+ parser.add_argument("--parallel", "-j", type=int, default=1) - parsed, _ = parser.parse_known_args() - -- nthreads = 0 -- if parsed.parallel: -- nthreads = parsed.parallel -- elif parsed.j: -- nthreads = parsed.j -- -- kwargs["nthreads"] = nthreads -+ kwargs["nthreads"] = parsed.parallel - build_ext.render_templates(_pxifiles) - return cythonize(extensions, *args, **kwargs) - -@@ -682,7 +644,8 @@ for name, data in ext_data.items(): - - sources.extend(data.get("sources", [])) - -- include = data.get("include") -+ include = data.get("include", []) -+ include.append(numpy.get_include()) - - obj = Extension( - f"pandas.{name}", -@@ -731,6 +694,7 @@ ujson_ext = Extension( - "pandas/_libs/src/ujson/python", - "pandas/_libs/src/ujson/lib", - "pandas/_libs/src/datetime", -+ numpy.get_include(), - ], - extra_compile_args=(["-D_GNU_SOURCE"] + extra_compile_args), - extra_link_args=extra_link_args, From 9b0b7d36a356949f73513e667d0879bfa604c627 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Mon, 7 Dec 2020 12:36:35 +0000 Subject: [PATCH 12/12] RLS v1.1.5 --- .travis.yml | 2 +- azure/posix.yml | 2 +- azure/windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d3b859b..19ae173 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ env: global: - REPO_DIR=pandas # on release change this to a version - - BUILD_COMMIT="1.1.x" + - BUILD_COMMIT="v1.1.5" - UNICODE_WIDTH=32 - PLAT=aarch64 - NP_BUILD_DEP="numpy==1.13.3" diff --git a/azure/posix.yml b/azure/posix.yml index 9d0df68..fe0e0f1 100644 --- a/azure/posix.yml +++ b/azure/posix.yml @@ -9,7 +9,7 @@ jobs: vmImage: ${{ parameters.vmImage }} variables: REPO_DIR: "pandas" - BUILD_COMMIT: "1.1.x" + BUILD_COMMIT: "v1.1.5" PLAT: "x86_64" NP_BUILD_DEP: "numpy==1.15.4" CYTHON_BUILD_DEP: "cython==0.29.21" diff --git a/azure/windows.yml b/azure/windows.yml index 7a834c9..1ec129a 100644 --- a/azure/windows.yml +++ b/azure/windows.yml @@ -8,7 +8,7 @@ jobs: pool: vmImage: ${{ parameters.vmImage }} variables: - BUILD_COMMIT: "1.1.x" + BUILD_COMMIT: "v1.1.5" NP_BUILD_DEP: "1.15.4" CYTHON_BUILD_DEP: "0.29.21" NIGHTLY_BUILD_COMMIT: "master"