From a95f1ac5e74b61814a253c16e4132c08bf7843fa031a99c445064c4b118b2021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 7 Jan 2020 06:39:50 +0000 Subject: [PATCH 1/8] Accepting request 761226 from home:TheBlackCat:branches:devel:languages:python:numeric - update to version 1.18.0: + Highlights * The C-API for ``numpy.random`` has been defined and documented. * Basic infrastructure for linking with 64 bit BLAS and LAPACK libraries. * Many documentation improvements. + New functions * Multivariate hypergeometric distribution added to ``numpy.random`` + Deprecations * ``np.fromfile`` and ``np.fromstring`` will error on bad data * Deprecate non-scalar arrays as fill values in ``ma.fill_value`` * Deprecate ``PyArray_As1D``, ``PyArray_As2D`` * Deprecate ``np.alen`` * Deprecate the financial functions * The ``axis`` argument to ``numpy.ma.mask_cols`` and ``numpy.ma.mask_row`` is deprecated + Expired deprecations * ``PyArray_As1D`` and ``PyArray_As2D`` have been removed in favor of ``PyArray_AsCArray`` * ``np.rank`` has been removed. This was deprecated in NumPy 1.10 and has been replaced by ``np.ndim``. * The deprecation of ``expand_dims`` out-of-range axes in 1.13.0 has expired. * ``PyArray_FromDimsAndDataAndDescr`` and ``PyArray_FromDims`` have been removed (they will always raise an error). Use ``PyArray_NewFromDescr`` and ``PyArray_SimpleNew`` instead. * ``numeric.loads``, ``numeric.load``, ``np.ma.dump``, ``np.ma.dumps``, ``np.ma.load``, ``np.ma.loads`` are removed, use ``pickle`` methods instead * ``arrayprint.FloatFormat``, ``arrayprint.LongFloatFormat`` has been removed, use ``FloatingFormat`` instead * ``arrayprint.ComplexFormat``, ``arrayprint.LongComplexFormat`` has been removed, use ``ComplexFloatingFormat`` instead * ``arrayprint.StructureFormat`` has been removed, use ``StructureVoidFormat`` instead * ``np.testing.rand`` has been removed. This was deprecated in NumPy 1.11 and has been replaced by ``np.random.rand``. * Class ``SafeEval`` in ``numpy/lib/utils.py`` has been removed. This was deprecated in NumPy 1.10. Use ``np.safe_eval`` instead. * Remove deprecated support for boolean and empty condition lists in ``np.select`` * Array order only accepts 'C', 'F', 'A', and 'K'. More permissive options were deprecated in NumPy 1.11. * np.linspace parameter ``num`` must be an integer. Deprecated in NumPy 1.12. * UFuncs with multiple outputs must use a tuple for the ``out`` kwarg. This finishes a deprecation started in NumPy 1.10. * The files ``numpy/testing/decorators.py``, ``numpy/testing/noseclasses.py`` and ``numpy/testing/nosetester.py`` have been removed. They were never meant to be public (all relevant objects are present in the ``numpy.testing`` namespace), and importing them has given a deprecation warning since NumPy 1.15.0 + Compatibility notes * `numpy.lib.recfunctions.drop_fields` can no longer return None * ``numpy.argmin/argmax/min/max`` returns ``NaT`` if it exists in array * ``np.can_cast(np.uint64, np.timedelta64, casting='safe')`` is now ``False`` * Changed random variate stream from ``numpy.random.Generator.integers`` * Add more ufunc loops for ``datetime64``, ``timedelta64`` * Moved modules in ``numpy.random`` + C API changes * ``PyDataType_ISUNSIZED(descr)`` now returns False for structured datatypes + New Features * Add our own ``*.pxd`` cython import file * A tuple of axes can now be input to ``expand_dims`` * Support for 64-bit OpenBLAS * Add ``--f2cmap`` option to F2PY + Improvements * Different C numeric types of the same size have unique names * ``argwhere`` now produces a consistent result on 0d arrays * Add ``axis`` argument for ``random.permutation`` and ``random.shuffle`` * ``method`` keyword argument for ``np.random.multivariate_normal`` * Add complex number support for ``numpy.fromstring`` * ``numpy.unique`` has consistent axes order when ``axis`` is not None * ``numpy.matmul`` with boolean output now converts to boolean values * ``numpy.random.randint`` produced incorrect value when the range was ``2**32`` * Add complex number support for ``numpy.fromfile`` * ``std=c99`` added if compiler is named ``gcc`` + Changes * ``NaT`` now sorts to the end of arrays * Incorrect ``threshold`` in ``np.set_printoptions`` raises ``TypeError`` or ``ValueError`` * Warn when saving a dtype with metadata * ``numpy.distutils`` append behavior changed for LDFLAGS and similar * Remove ``numpy.random.entropy`` without a deprecation * Add options to quiet build configuration and build with ``-Werror`` OBS-URL: https://build.opensuse.org/request/show/761226 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=47 --- _constraints | 4 +- numpy-1.17.4.zip | 3 -- numpy-1.18.0.zip | 3 ++ python-numpy-rpmlintrc | 1 + python-numpy.changes | 86 ++++++++++++++++++++++++++++++++++++++++++ python-numpy.spec | 22 ++++++----- 6 files changed, 105 insertions(+), 14 deletions(-) delete mode 100644 numpy-1.17.4.zip create mode 100644 numpy-1.18.0.zip diff --git a/_constraints b/_constraints index c685be2..383d896 100644 --- a/_constraints +++ b/_constraints @@ -1,10 +1,10 @@ - 5 + 6 - 5 + 6 diff --git a/numpy-1.17.4.zip b/numpy-1.17.4.zip deleted file mode 100644 index 7f37593..0000000 --- a/numpy-1.17.4.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f58913e9227400f1395c7b800503ebfdb0772f1c33ff8cb4d6451c06cabdf316 -size 6366657 diff --git a/numpy-1.18.0.zip b/numpy-1.18.0.zip new file mode 100644 index 0000000..9c4801e --- /dev/null +++ b/numpy-1.18.0.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9d72d9abaf65628f0f31bbb573b7d9304e43b1e6bbae43149c17737a42764c4 +size 5422309 diff --git a/python-numpy-rpmlintrc b/python-numpy-rpmlintrc index febb29c..0221902 100644 --- a/python-numpy-rpmlintrc +++ b/python-numpy-rpmlintrc @@ -1,2 +1,3 @@ # This file is required for testing addFilter("devel-file-in-non-devel-package.*/usr/lib.*/python.*/site-packages/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c") +addFilter("hidden-file-or-dir .*/numpy/f2py/tests/src/assumed_shape/.f2py_f2cmap") diff --git a/python-numpy.changes b/python-numpy.changes index c801e44..831f585 100644 --- a/python-numpy.changes +++ b/python-numpy.changes @@ -1,3 +1,89 @@ +------------------------------------------------------------------- +Mon Jan 6 15:34:51 UTC 2020 - Todd R + +- update to version 1.18.0: + + Highlights + * The C-API for ``numpy.random`` has been defined and documented. + * Basic infrastructure for linking with 64 bit BLAS and LAPACK libraries. + * Many documentation improvements. + + New functions + * Multivariate hypergeometric distribution added to ``numpy.random`` + + Deprecations + * ``np.fromfile`` and ``np.fromstring`` will error on bad data + * Deprecate non-scalar arrays as fill values in ``ma.fill_value`` + * Deprecate ``PyArray_As1D``, ``PyArray_As2D`` + * Deprecate ``np.alen`` + * Deprecate the financial functions + * The ``axis`` argument to ``numpy.ma.mask_cols`` and ``numpy.ma.mask_row`` is deprecated + + Expired deprecations + * ``PyArray_As1D`` and ``PyArray_As2D`` have been removed in favor of + ``PyArray_AsCArray`` + * ``np.rank`` has been removed. This was deprecated in NumPy 1.10 + and has been replaced by ``np.ndim``. + * The deprecation of ``expand_dims`` out-of-range axes in 1.13.0 has + expired. + * ``PyArray_FromDimsAndDataAndDescr`` and ``PyArray_FromDims`` have been + removed (they will always raise an error). Use ``PyArray_NewFromDescr`` + and ``PyArray_SimpleNew`` instead. + * ``numeric.loads``, ``numeric.load``, ``np.ma.dump``, + ``np.ma.dumps``, ``np.ma.load``, ``np.ma.loads`` are removed, + use ``pickle`` methods instead + * ``arrayprint.FloatFormat``, ``arrayprint.LongFloatFormat`` has been removed, + use ``FloatingFormat`` instead + * ``arrayprint.ComplexFormat``, ``arrayprint.LongComplexFormat`` has been + removed, use ``ComplexFloatingFormat`` instead + * ``arrayprint.StructureFormat`` has been removed, use ``StructureVoidFormat`` + instead + * ``np.testing.rand`` has been removed. This was deprecated in NumPy 1.11 + and has been replaced by ``np.random.rand``. + * Class ``SafeEval`` in ``numpy/lib/utils.py`` has been removed. + This was deprecated in NumPy 1.10. Use ``np.safe_eval`` instead. + * Remove deprecated support for boolean and empty condition lists in + ``np.select`` + * Array order only accepts 'C', 'F', 'A', and 'K'. More permissive options + were deprecated in NumPy 1.11. + * np.linspace parameter ``num`` must be an integer. Deprecated in NumPy 1.12. + * UFuncs with multiple outputs must use a tuple for the ``out`` kwarg. This + finishes a deprecation started in NumPy 1.10. + * The files ``numpy/testing/decorators.py``, ``numpy/testing/noseclasses.py`` + and ``numpy/testing/nosetester.py`` have been removed. They were never + meant to be public (all relevant objects are present in the + ``numpy.testing`` namespace), and importing them has given a deprecation + warning since NumPy 1.15.0 + + Compatibility notes + * `numpy.lib.recfunctions.drop_fields` can no longer return None + * ``numpy.argmin/argmax/min/max`` returns ``NaT`` if it exists in array + * ``np.can_cast(np.uint64, np.timedelta64, casting='safe')`` is now ``False`` + * Changed random variate stream from ``numpy.random.Generator.integers`` + * Add more ufunc loops for ``datetime64``, ``timedelta64`` + * Moved modules in ``numpy.random`` + + C API changes + * ``PyDataType_ISUNSIZED(descr)`` now returns False for structured datatypes + + New Features + * Add our own ``*.pxd`` cython import file + * A tuple of axes can now be input to ``expand_dims`` + * Support for 64-bit OpenBLAS + * Add ``--f2cmap`` option to F2PY + + Improvements + * Different C numeric types of the same size have unique names + * ``argwhere`` now produces a consistent result on 0d arrays + * Add ``axis`` argument for ``random.permutation`` and ``random.shuffle`` + * ``method`` keyword argument for ``np.random.multivariate_normal`` + * Add complex number support for ``numpy.fromstring`` + * ``numpy.unique`` has consistent axes order when ``axis`` is not None + * ``numpy.matmul`` with boolean output now converts to boolean values + * ``numpy.random.randint`` produced incorrect value when the range was ``2**32`` + * Add complex number support for ``numpy.fromfile`` + * ``std=c99`` added if compiler is named ``gcc`` + + Changes + * ``NaT`` now sorts to the end of arrays + * Incorrect ``threshold`` in ``np.set_printoptions`` raises ``TypeError`` or ``ValueError`` + * Warn when saving a dtype with metadata + * ``numpy.distutils`` append behavior changed for LDFLAGS and similar + * Remove ``numpy.random.entropy`` without a deprecation + * Add options to quiet build configuration and build with ``-Werror`` + + ------------------------------------------------------------------- Sat Nov 16 17:51:25 UTC 2019 - Arun Persaud diff --git a/python-numpy.spec b/python-numpy.spec index 61b4be9..a7c6f73 100644 --- a/python-numpy.spec +++ b/python-numpy.spec @@ -1,7 +1,7 @@ # # spec file for package python-numpy # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ %global flavor @BUILD_FLAVOR@%{nil} -%define _ver 1_17_1 +%define _ver 1_18_0 %define pname python-numpy %define hpc_upcase_trans_hyph() %(echo %{**} | tr [a-z] [A-Z] | tr '-' '_') %if "%{flavor}" == "" @@ -70,7 +70,7 @@ ExclusiveArch: do_not_build %endif %endif Name: %{package_name} -Version: 1.17.4 +Version: 1.18.0 Release: 0 Summary: NumPy array processing for numbers, strings, records and objects License: BSD-3-Clause @@ -89,6 +89,7 @@ BuildRequires: %{python_module devel} BuildRequires: %{python_module pytest-xdist} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module testsuite} BuildRequires: python-rpm-macros BuildRequires: unzip %if 0%{?suse_version} @@ -159,7 +160,8 @@ This package contains files for developing applications using numpy. %patch4 -p1 %endif # Fix non-executable scripts -sed -i '1s/^#!.*$//' numpy/{compat/setup,distutils/{conv_template,cpuinfo,exec_command,from_template,setup,system_info},f2py/{__init__,auxfuncs,capi_maps,cb_rules,cfuncs,common_rules,crackfortran,diagnose,f2py2e,f90mod_rules,func2subr,rules,setup,use_rules},ma/{setup,bench},matrixlib/setup,setup,testing/{print_coercion_tables,setup}}.py +sed -i '1s/^#!.*$//' numpy/{compat/setup,random/_examples/cython/setup,distutils/{conv_template,cpuinfo,exec_command,from_template,setup,system_info},f2py/{__init__,auxfuncs,capi_maps,cb_rules,cfuncs,common_rules,crackfortran,diagnose,f2py2e,f90mod_rules,func2subr,rules,setup,use_rules},ma/{setup,bench},matrixlib/setup,setup,testing/{print_coercion_tables,setup}}.py +sed -i '1s/^#!.*$//' numpy/random/_examples/cython/*.pyx # force cythonization rm PKG-INFO @@ -192,11 +194,7 @@ export CFLAGS="%{optflags} -fno-strict-aliasing" %fdupes %{buildroot}%{p_prefix} %endif -%if %{without hpc} - -#%%python_expand rm -rf %{buildroot}%{$python_sitearch}/numpy/{,core,distutils,f2py,fft,lib,linalg,ma,matrixlib,oldnumeric,polynomial,random,testing}/tests # Don't package testsuite - -%else +%if %{with hpc} %define hpc_module_pname python${py_ver/.*/}-numpy %{python_expand # Don't package testsuite @@ -237,8 +235,11 @@ setenv %{hpc_upcase_trans_hyph %{pname}}_BIN %{hpc_bindir} family "NumPy" EOF } + %endif + + %check %if %{without hpc} export PYTHONDONTWRITEBYTECODE=1 @@ -251,6 +252,9 @@ pushd testing %pytest_arch -n auto --pyargs numpy %endif popd + +# These are created during testing +rm -rf %{buildroot}%{python_sitearch}/numpy/random/_examples/cython/*.c %endif %files %{python_files} From 136be57a2c0be68cc321507fb11758335c4d0269aa79d8fadc64e46553ae6e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 7 Jan 2020 15:36:27 +0000 Subject: [PATCH 2/8] Accepting request 761646 from home:TheBlackCat:branches:devel:languages:python:numeric - update to version 1.18.1 * The cython random extension test was not using a temporary directory for building, resulting in a permission violation. * Numpy distutils was appending -std=c99 to all C compiler runs, leading to changed behavior and compile problems downstream. That flag is now only applied when building numpy C code. OBS-URL: https://build.opensuse.org/request/show/761646 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=48 --- numpy-1.18.0.zip | 3 --- numpy-1.18.1.zip | 3 +++ python-numpy.changes | 10 ++++++++++ python-numpy.spec | 7 ++----- 4 files changed, 15 insertions(+), 8 deletions(-) delete mode 100644 numpy-1.18.0.zip create mode 100644 numpy-1.18.1.zip diff --git a/numpy-1.18.0.zip b/numpy-1.18.0.zip deleted file mode 100644 index 9c4801e..0000000 --- a/numpy-1.18.0.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a9d72d9abaf65628f0f31bbb573b7d9304e43b1e6bbae43149c17737a42764c4 -size 5422309 diff --git a/numpy-1.18.1.zip b/numpy-1.18.1.zip new file mode 100644 index 0000000..52e84fc --- /dev/null +++ b/numpy-1.18.1.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6ff59cee96b454516e47e7721098e6ceebef435e3e21ac2d6c3b8b02628eb77 +size 5430477 diff --git a/python-numpy.changes b/python-numpy.changes index 831f585..5d2acd8 100644 --- a/python-numpy.changes +++ b/python-numpy.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Jan 7 15:10:48 UTC 2020 - Todd R + +- update to version 1.18.1 + * The cython random extension test was not using a temporary + directory for building, resulting in a permission violation. + * Numpy distutils was appending -std=c99 to all C compiler runs, + leading to changed behavior and compile problems downstream. + That flag is now only applied when building numpy C code. + ------------------------------------------------------------------- Mon Jan 6 15:34:51 UTC 2020 - Todd R diff --git a/python-numpy.spec b/python-numpy.spec index a7c6f73..e911ddc 100644 --- a/python-numpy.spec +++ b/python-numpy.spec @@ -17,7 +17,7 @@ %global flavor @BUILD_FLAVOR@%{nil} -%define _ver 1_18_0 +%define _ver 1_18_1 %define pname python-numpy %define hpc_upcase_trans_hyph() %(echo %{**} | tr [a-z] [A-Z] | tr '-' '_') %if "%{flavor}" == "" @@ -70,7 +70,7 @@ ExclusiveArch: do_not_build %endif %endif Name: %{package_name} -Version: 1.18.0 +Version: 1.18.1 Release: 0 Summary: NumPy array processing for numbers, strings, records and objects License: BSD-3-Clause @@ -252,9 +252,6 @@ pushd testing %pytest_arch -n auto --pyargs numpy %endif popd - -# These are created during testing -rm -rf %{buildroot}%{python_sitearch}/numpy/random/_examples/cython/*.c %endif %files %{python_files} From 84607317fe1198841b170feed0a80d8f6787a13ff4284cc5957a09f1e195924a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sat, 28 Mar 2020 18:05:09 +0000 Subject: [PATCH 3/8] Accepting request 789340 from home:apersaud:branches:devel:languages:python:numeric update to latest version OBS-URL: https://build.opensuse.org/request/show/789340 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=49 --- numpy-1.18.1.zip | 3 --- numpy-1.18.2.zip | 3 +++ python-numpy.changes | 11 +++++++++++ python-numpy.spec | 4 +--- 4 files changed, 15 insertions(+), 6 deletions(-) delete mode 100644 numpy-1.18.1.zip create mode 100644 numpy-1.18.2.zip diff --git a/numpy-1.18.1.zip b/numpy-1.18.1.zip deleted file mode 100644 index 52e84fc..0000000 --- a/numpy-1.18.1.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b6ff59cee96b454516e47e7721098e6ceebef435e3e21ac2d6c3b8b02628eb77 -size 5430477 diff --git a/numpy-1.18.2.zip b/numpy-1.18.2.zip new file mode 100644 index 0000000..341c79d --- /dev/null +++ b/numpy-1.18.2.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7894793e6e8540dbeac77c87b489e331947813511108ae097f1715c018b8f3d +size 5433240 diff --git a/python-numpy.changes b/python-numpy.changes index 5d2acd8..7296f32 100644 --- a/python-numpy.changes +++ b/python-numpy.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Sat Mar 28 16:39:11 UTC 2020 - Arun Persaud + +- update to version 1.18.2: + * #15675: TST: move _no_tracing to testing._private + * #15676: MAINT: Large overhead in some random functions + * #15677: TST: Do not create gfortran link in azure Mac testing. + * #15679: BUG: Added missing error check in ndarray.__contains__ + * #15722: MAINT: use list-based APIs to call subprocesses + * #15734: BUG: fix logic error when nm fails on 32-bit + ------------------------------------------------------------------- Tue Jan 7 15:10:48 UTC 2020 - Todd R diff --git a/python-numpy.spec b/python-numpy.spec index e911ddc..33de1fb 100644 --- a/python-numpy.spec +++ b/python-numpy.spec @@ -70,7 +70,7 @@ ExclusiveArch: do_not_build %endif %endif Name: %{package_name} -Version: 1.18.1 +Version: 1.18.2 Release: 0 Summary: NumPy array processing for numbers, strings, records and objects License: BSD-3-Clause @@ -238,8 +238,6 @@ EOF %endif - - %check %if %{without hpc} export PYTHONDONTWRITEBYTECODE=1 From 3756b8af4255e19cd3b002edca4c443cc60654b54838ef2a778ca1087cca2d99 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 6 Apr 2020 21:42:47 +0000 Subject: [PATCH 4/8] - Use update-alternatives for /usr/bin/f2py OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=50 --- python-numpy.changes | 5 +++++ python-numpy.spec | 15 +++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/python-numpy.changes b/python-numpy.changes index 7296f32..24326cb 100644 --- a/python-numpy.changes +++ b/python-numpy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Apr 6 21:42:29 UTC 2020 - Matej Cepl + +- Use update-alternatives for /usr/bin/f2py + ------------------------------------------------------------------- Sat Mar 28 16:39:11 UTC 2020 - Arun Persaud diff --git a/python-numpy.spec b/python-numpy.spec index 33de1fb..deda28c 100644 --- a/python-numpy.spec +++ b/python-numpy.spec @@ -113,6 +113,8 @@ BuildRequires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc-devel BuildRequires: lua-lmod BuildRequires: suse-hpc Requires: libopenblas%{?hpc_ext}-%{compiler_family}%{?c_f_ver}-hpc +Requires(post): update-alternatives +Requires(postun): update-alternatives %endif %python_subpackages @@ -189,6 +191,8 @@ export CFLAGS="%{optflags} -fno-strict-aliasing" %{?with_hpc:module load openblas} %python_exec setup.py install --prefix=%{p_prefix} --root=%{buildroot} +%python_clone -a %{buildroot}%{p_prefix}/bin/f2py +rm -v %{buildroot}%{p_prefix}/bin/f2py3* %if 0%{?suse_version} %fdupes %{buildroot}%{p_prefix} @@ -252,13 +256,17 @@ pushd testing popd %endif +%post +%python_install_alternative f2py + +%postun +%python_uninstall_alternative f2py + %files %{python_files} %doc README.md THANKS.txt -%python3_only %{p_bindir}/f2py3* -%python3_only %{p_bindir}/f2py +%python_alternative %{p_bindir}/f2py %if %{without hpc} %{python_sitearch}/numpy/ -%{python_sitearch}/numpy/LICENSE.txt %{python_sitearch}/numpy-%{version}-py*.egg-info %license %{python_sitearch}/numpy/LICENSE.txt %exclude %{python_sitearch}/numpy/core/include/ @@ -267,7 +275,6 @@ popd %exclude %{python_sitearch}/numpy/core/lib/libnpymath.a %else %{p_python_sitearch}/numpy/ -%{p_python_sitearch}/numpy/LICENSE.txt %{p_python_sitearch}/numpy-%{version}-py*.egg-info %license %{p_python_sitearch}/numpy/LICENSE.txt %exclude %{p_python_sitearch}/numpy/core/include/ From 4a25d3a4dc5e0d644fc3aa614d1ef2d29853c5b9fdd5cbaa7fb1202bab019ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 7 Apr 2020 11:56:09 +0000 Subject: [PATCH 5/8] - Also still install f2py that is used by many other depending software OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=51 --- python-numpy.changes | 6 ++++++ python-numpy.spec | 15 ++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/python-numpy.changes b/python-numpy.changes index 24326cb..c933362 100644 --- a/python-numpy.changes +++ b/python-numpy.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Apr 7 11:55:43 UTC 2020 - Tomáš Chvátal + +- Also still install f2py that is used by many other + depending software + ------------------------------------------------------------------- Mon Apr 6 21:42:29 UTC 2020 - Matej Cepl diff --git a/python-numpy.spec b/python-numpy.spec index deda28c..5bab68c 100644 --- a/python-numpy.spec +++ b/python-numpy.spec @@ -191,8 +191,8 @@ export CFLAGS="%{optflags} -fno-strict-aliasing" %{?with_hpc:module load openblas} %python_exec setup.py install --prefix=%{p_prefix} --root=%{buildroot} -%python_clone -a %{buildroot}%{p_prefix}/bin/f2py -rm -v %{buildroot}%{p_prefix}/bin/f2py3* + +%prepare_alternative f2py %if 0%{?suse_version} %fdupes %{buildroot}%{p_prefix} @@ -257,14 +257,19 @@ popd %endif %post -%python_install_alternative f2py +# can't use `python_install_alternative` because it also installs f2py3 +PRIO=$(echo %{python_version} | tr -d .) +%install_alternative f2py %{_bindir}/f2py%{python_version} $PRIO %postun -%python_uninstall_alternative f2py +%uninstall_alternative f2py %{_bindir}/f2py%{python_version} %files %{python_files} %doc README.md THANKS.txt -%python_alternative %{p_bindir}/f2py +%ghost %{_sysconfdir}/alternatives/f2py +%{p_bindir}/f2py +%{p_bindir}/f2py%{python_version} +%python3_only %{p_bindir}/f2py3 %if %{without hpc} %{python_sitearch}/numpy/ %{python_sitearch}/numpy-%{version}-py*.egg-info From 806fb711190116ff7d8e3a543ad1d6c1767c43071908ba390cf15287eb62c1b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 7 Apr 2020 13:08:50 +0000 Subject: [PATCH 6/8] - Do not use alternatives on HPC as it is pain to get it working OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=52 --- python-numpy.changes | 5 +++++ python-numpy.spec | 19 ++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/python-numpy.changes b/python-numpy.changes index c933362..37970bf 100644 --- a/python-numpy.changes +++ b/python-numpy.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 7 13:08:32 UTC 2020 - Tomáš Chvátal + +- Do not use alternatives on HPC as it is pain to get it working + ------------------------------------------------------------------- Tue Apr 7 11:55:43 UTC 2020 - Tomáš Chvátal diff --git a/python-numpy.spec b/python-numpy.spec index 5bab68c..9b8cbd1 100644 --- a/python-numpy.spec +++ b/python-numpy.spec @@ -192,7 +192,9 @@ export CFLAGS="%{optflags} -fno-strict-aliasing" %python_exec setup.py install --prefix=%{p_prefix} --root=%{buildroot} -%prepare_alternative f2py +%if !%{with hpc} +%python_clone -a %{buildroot}%{p_bindir}/f2py +%endif %if 0%{?suse_version} %fdupes %{buildroot}%{p_prefix} @@ -256,21 +258,19 @@ pushd testing popd %endif +%if %{without hpc} %post -# can't use `python_install_alternative` because it also installs f2py3 -PRIO=$(echo %{python_version} | tr -d .) -%install_alternative f2py %{_bindir}/f2py%{python_version} $PRIO +%python_install_alternative f2py %postun -%uninstall_alternative f2py %{_bindir}/f2py%{python_version} +%python_uninstall_alternative f2py +%endif %files %{python_files} %doc README.md THANKS.txt -%ghost %{_sysconfdir}/alternatives/f2py -%{p_bindir}/f2py -%{p_bindir}/f2py%{python_version} -%python3_only %{p_bindir}/f2py3 %if %{without hpc} +%python_alternative %{bindir}/f2py +%python3_only %{bindir}/f2py3* %{python_sitearch}/numpy/ %{python_sitearch}/numpy-%{version}-py*.egg-info %license %{python_sitearch}/numpy/LICENSE.txt @@ -279,6 +279,7 @@ PRIO=$(echo %{python_version} | tr -d .) %exclude %{python_sitearch}/numpy/f2py/src/ %exclude %{python_sitearch}/numpy/core/lib/libnpymath.a %else +%python3_only %{p_bindir}/f2py* %{p_python_sitearch}/numpy/ %{p_python_sitearch}/numpy-%{version}-py*.egg-info %license %{p_python_sitearch}/numpy/LICENSE.txt From 9a860be495ecb101512fedc83c219c585a101a21d41cacaed2825677fa411c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 7 Apr 2020 13:59:46 +0000 Subject: [PATCH 7/8] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=53 --- python-numpy.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python-numpy.spec b/python-numpy.spec index 9b8cbd1..50e5b92 100644 --- a/python-numpy.spec +++ b/python-numpy.spec @@ -193,7 +193,7 @@ export CFLAGS="%{optflags} -fno-strict-aliasing" %python_exec setup.py install --prefix=%{p_prefix} --root=%{buildroot} %if !%{with hpc} -%python_clone -a %{buildroot}%{p_bindir}/f2py +%python_clone -a %{buildroot}%{bindir}/f2py %endif %if 0%{?suse_version} @@ -269,8 +269,8 @@ popd %files %{python_files} %doc README.md THANKS.txt %if %{without hpc} -%python_alternative %{bindir}/f2py -%python3_only %{bindir}/f2py3* +%python_alternative %{_bindir}/f2py +%python3_only %{_bindir}/f2py3* %{python_sitearch}/numpy/ %{python_sitearch}/numpy-%{version}-py*.egg-info %license %{python_sitearch}/numpy/LICENSE.txt From bc4475f98452ec6e0a2249cf2954918860199c51d82eb92f0b3a421979187084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 8 Apr 2020 08:23:46 +0000 Subject: [PATCH 8/8] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpy?expand=0&rev=54 --- python-numpy.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-numpy.spec b/python-numpy.spec index 50e5b92..066229f 100644 --- a/python-numpy.spec +++ b/python-numpy.spec @@ -193,7 +193,7 @@ export CFLAGS="%{optflags} -fno-strict-aliasing" %python_exec setup.py install --prefix=%{p_prefix} --root=%{buildroot} %if !%{with hpc} -%python_clone -a %{buildroot}%{bindir}/f2py +%python_clone -a %{buildroot}%{_bindir}/f2py %endif %if 0%{?suse_version}