From acf8c48af9d166d76938d9feed91db097973ec17 Mon Sep 17 00:00:00 2001 From: Marcel Loose Date: Mon, 14 Feb 2022 16:15:50 +0100 Subject: [PATCH] Fix numpy api compatibility issue (#175) * Fix compatibility issue with NumPy API There is a potential API compatibility issue with the NumPy. When building binary wheels, the latest NumPy is used. However, the user may already have installed on older version of NumPy on his system. If the API has changed between those two version, you will get an incompatibility error. See for example https://github.com/pypa/pip/issues/9542 for more details. The solution suggested there, use `oldest-supported-numpy` instead of `numpy`, has been adopted. * Bump version number to 1.10.1 --- bdsf/_version.py | 4 +++- doc/source/conf.py | 2 +- doc/source/whats_new.rst | 3 +++ manylinux2010/wheel36.docker | 2 +- manylinux2010/wheel37.docker | 2 +- manylinux2010/wheel38.docker | 2 +- manylinux2010/wheel39.docker | 2 +- pyproject.toml | 2 +- setup.py | 2 +- 9 files changed, 13 insertions(+), 8 deletions(-) diff --git a/bdsf/_version.py b/bdsf/_version.py index 089e7e4..3039462 100644 --- a/bdsf/_version.py +++ b/bdsf/_version.py @@ -4,7 +4,7 @@ """ # Version number -__version__ = '1.10.0' +__version__ = '1.10.1' # Changelog @@ -12,6 +12,8 @@ def changelog(): """ PyBDSF Changelog. ----------------------------------------------------------------------- + 2022/02/14 - Version 1.10.1: Fix Numpy API incompatibility issue + 2022/02/09 - Version 1.10.0 2022/02/09 - Update some functions as required by scipy versions >= 1.8.0 diff --git a/doc/source/conf.py b/doc/source/conf.py index 6bbc9f2..d3c42ac 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -53,7 +53,7 @@ # The short X.Y version. version = '1.10' # The full version, including alpha/beta/rc tags. -release = '1.10.0' +release = '1.10.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/doc/source/whats_new.rst b/doc/source/whats_new.rst index 05458a7..0bf0ab1 100644 --- a/doc/source/whats_new.rst +++ b/doc/source/whats_new.rst @@ -4,6 +4,9 @@ What's New ********** +Version 1.10.1 (2022/02/14): + * Fix NumPy API compatibility issue + Version 1.10.0 (2022/02/09): * Update some functions as required by scipy version >= 1.8.0 (PR #172) diff --git a/manylinux2010/wheel36.docker b/manylinux2010/wheel36.docker index 11f562b..89396dd 100644 --- a/manylinux2010/wheel36.docker +++ b/manylinux2010/wheel36.docker @@ -20,7 +20,7 @@ ENV PYUNICODE m ENV TARGET cp${PYMAJOR}${PYMINOR}-cp${PYMAJOR}${PYMINOR}${PYUNICODE} # install python dependencies, make boost install also boost_numpy -RUN /opt/python/${TARGET}/bin/pip install numpy +RUN /opt/python/${TARGET}/bin/pip install oldest-supported-numpy # setup boost WORKDIR /build diff --git a/manylinux2010/wheel37.docker b/manylinux2010/wheel37.docker index 05eaf30..4093f74 100644 --- a/manylinux2010/wheel37.docker +++ b/manylinux2010/wheel37.docker @@ -20,7 +20,7 @@ ENV PYUNICODE m ENV TARGET cp${PYMAJOR}${PYMINOR}-cp${PYMAJOR}${PYMINOR}${PYUNICODE} # install python dependencies, make boost install also boost_numpy -RUN /opt/python/${TARGET}/bin/pip install numpy +RUN /opt/python/${TARGET}/bin/pip install oldest-supported-numpy # setup boost WORKDIR /build diff --git a/manylinux2010/wheel38.docker b/manylinux2010/wheel38.docker index 45eff8c..2873fc7 100644 --- a/manylinux2010/wheel38.docker +++ b/manylinux2010/wheel38.docker @@ -19,7 +19,7 @@ ENV PYMINOR 8 ENV TARGET cp${PYMAJOR}${PYMINOR}-cp${PYMAJOR}${PYMINOR} # install python dependencies, make boost install also boost_numpy -RUN /opt/python/${TARGET}/bin/pip install numpy +RUN /opt/python/${TARGET}/bin/pip install oldest-supported-numpy # setup boost WORKDIR /build diff --git a/manylinux2010/wheel39.docker b/manylinux2010/wheel39.docker index 49d1151..bea83fc 100644 --- a/manylinux2010/wheel39.docker +++ b/manylinux2010/wheel39.docker @@ -19,7 +19,7 @@ ENV PYMINOR 9 ENV TARGET cp${PYMAJOR}${PYMINOR}-cp${PYMAJOR}${PYMINOR} # install python dependencies, make boost install also boost_numpy -RUN /opt/python/${TARGET}/bin/pip install numpy +RUN /opt/python/${TARGET}/bin/pip install oldest-supported-numpy # setup boost WORKDIR /build diff --git a/pyproject.toml b/pyproject.toml index b9f1533..eaeed4b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,4 @@ [build-system] requires = ["setuptools", "wheel", - "numpy"] + "oldest-supported-numpy"] diff --git a/setup.py b/setup.py index 19a3d31..76b4db6 100755 --- a/setup.py +++ b/setup.py @@ -247,7 +247,7 @@ def main(): setup( name='bdsf', - version='1.10.0', + version='1.10.1', author='David Rafferty', author_email='drafferty@hs.uni-hamburg.de', url='https://github.com/lofar-astron/PyBDSF',