From 90c69b023213137a77d177ec7581a7cacff14d88 Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Sun, 31 Dec 2023 23:09:55 +0800 Subject: [PATCH] alvistack/1.26.1 git clean -xdf git submodule sync --recursive git submodule update --recursive --init git submodule foreach --recursive git checkout -- . tar zcvf ../python-numpy_1.26.1.orig.tar.gz --exclude=.git . debuild -uc -us cp python-numpy.spec ../python-numpy_1.26.1-1.spec cp ../python*-numpy*1.26.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/numpy-numpy-1.26.1/ rm -rf ../python*-numpy*1.26.1*.* See https://github.com/numpy/numpy/issues/22623 See https://github.com/pypa/setuptools/pull/3705 Signed-off-by: Wong Hoi Sing Edison --- .gitignore | 2 + LICENSE.txt | 24 +++ debian/.gitignore | 7 + debian/changelog | 5 + debian/control | 53 ++++++ debian/copyright | 21 +++ debian/dh_numpy3 | 58 +++++++ debian/dh_numpy3.1 | 15 ++ debian/numpy3.pm | 8 + debian/python-numpy-doc.lintian-overrides | 3 + debian/python3-numpy.install | 5 + debian/python3-numpy.lintian-overrides | 8 + debian/rules | 51 ++++++ debian/source/format | 1 + debian/source/lintian-overrides | 5 + debian/versions | 15 ++ debian/versions3.helper | 24 +++ python-numpy.spec | 195 ++++++++++++++++++++++ setup.py | 2 +- 19 files changed, 501 insertions(+), 1 deletion(-) create mode 100644 debian/.gitignore create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/dh_numpy3 create mode 100644 debian/dh_numpy3.1 create mode 100644 debian/numpy3.pm create mode 100644 debian/python-numpy-doc.lintian-overrides create mode 100644 debian/python3-numpy.install create mode 100644 debian/python3-numpy.lintian-overrides create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/source/lintian-overrides create mode 100644 debian/versions create mode 100644 debian/versions3.helper create mode 100644 python-numpy.spec diff --git a/.gitignore b/.gitignore index 3de77ebc4cac..948566352c07 100644 --- a/.gitignore +++ b/.gitignore @@ -231,3 +231,5 @@ numpy/core/src/umath/loops_autovec.dispatch.c # multiarray module numpy/core/src/multiarray/argfunc.dispatch.c numpy/core/src/multiarray/arraytypes.h + +.pybuild/ diff --git a/LICENSE.txt b/LICENSE.txt index 014d51c98dfa..2dfbf61c056e 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -28,3 +28,27 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +The NumPy repository and source distributions bundle several libraries that are +compatibly licensed. We list these here. + +Name: lapack-lite +Files: numpy/linalg/lapack_lite/* +License: BSD-3-Clause + For details, see numpy/linalg/lapack_lite/LICENSE.txt + +Name: tempita +Files: tools/npy_tempita/* +License: MIT + For details, see tools/npy_tempita/license.txt + +Name: dragon4 +Files: numpy/core/src/multiarray/dragon4.c +License: MIT + For license text, see numpy/core/src/multiarray/dragon4.c + +Name: libdivide +Files: numpy/core/include/numpy/libdivide/* +License: Zlib + For license text, see numpy/core/include/numpy/libdivide/LICENSE.txt diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 000000000000..1da6a4de8c8a --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,7 @@ +*.substvars +*debhelper* +.debhelper +files +python3-numpy +python-numpy-doc +tmp diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000000..15786aa681df --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +python-numpy (100:1.26.1-1) UNRELEASED; urgency=medium + + * https://github.com/numpy/numpy/releases/tag/v1.26.1 + + -- Wong Hoi Sing Edison Sun, 24 Dec 2023 23:48:28 +0800 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000000..f9dd7b066a24 --- /dev/null +++ b/debian/control @@ -0,0 +1,53 @@ +Source: python-numpy +Section: python +Priority: optional +Standards-Version: 4.5.0 +Maintainer: Wong Hoi Sing Edison +Homepage: https://github.com/numpy/numpy/tags +Vcs-Browser: https://github.com/alvistack/numpy-numpy +Vcs-Git: https://github.com/alvistack/numpy-numpy.git +Build-Depends: + debhelper, + debhelper-compat (= 10), + dh-python, + cython3, + fdupes, + gfortran, + liblapack-dev, + libopenblas-dev, + python3-dev, + python3-numpy , + python3-setuptools, + +Package: python3-numpy +Architecture: amd64 +Description: Fast array facility to the Python 3 language + Numpy contains a powerful N-dimensional array object, sophisticated + (broadcasting) functions, tools for integrating C/C++ and Fortran code, + and useful linear algebra, Fourier transform, and random number + capabilities. +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + python3, + python3-pkg-resources, +Suggests: + gcc, + gfortran, + python-numpy-doc, + python3-dev, + python3-pytest, +Provides: + ${numpy3:Provides}, + ${python3:Provides}, + dh-sequence-numpy3, + python3-f2py, + python3-numpy-dev, + +Package: python-numpy-doc +Section: doc +Architecture: all +Description: NumPy documentation + This package contains documentation for Numpy and f2py. +Depends: + ${misc:Depends}, diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000000..12900b4193ce --- /dev/null +++ b/debian/copyright @@ -0,0 +1,21 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: debian/* +Copyright: 2024 Wong Hoi Sing Edison +License: Apache-2.0 + +License: Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + The complete text of the Apache version 2.0 license + can be found in "/usr/share/common-licenses/Apache-2.0". diff --git a/debian/dh_numpy3 b/debian/dh_numpy3 new file mode 100644 index 000000000000..8af6e983fcf1 --- /dev/null +++ b/debian/dh_numpy3 @@ -0,0 +1,58 @@ +#!/usr/bin/perl -w + +# Copyright © 2010 Piotr Ożarowski +# Copyright © 2012 Jakub Wilk +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +use strict; +use Debian::Debhelper::Dh_Lib; + +init(options => { + "strict" => \$dh{STRICT}, +}); + +my %data; + +open(FILE, '<', '/usr/share/numpy3/versions') or error("cannot read version data: $!\n"); +while () { + chomp; + next unless /^[^#]/; + my ($key, $value) = split; + $data{$key} = $value; +} +close FILE; + +unless ($data{'abi'} and $data{'api'} and $data{'api-min-version'}) { + error("cannot parse version data file"); +} + +foreach my $package (@{$dh{DOPACKAGES}}) { + my $numpy_dep; + if (package_arch($package) eq 'all') { + $numpy_dep = 'python3-numpy'; + } elsif ($dh{STRICT}) { + $numpy_dep = "python3-numpy-api$data{'api'}"; + } else { + $numpy_dep = "python3-numpy (>= $data{'api-min-version'}), python3-numpy-abi$data{'abi'}"; + } + addsubstvar($package, "python3:Depends", $numpy_dep); +} + +exit 0 diff --git a/debian/dh_numpy3.1 b/debian/dh_numpy3.1 new file mode 100644 index 000000000000..0fadecd50abf --- /dev/null +++ b/debian/dh_numpy3.1 @@ -0,0 +1,15 @@ +.TH DH_NUMPY3 1 "2012-01-29" "Numpy" +.SH NAME +dh_numpy3 \- adds Numpy depends to python:Depends substvar +.SH SYNOPSIS +\fBdh_numpy3\fR [\fIdebhelper\ options\fR] +.SH DESCRIPTION +dh_numpy3 adds information about the correct versioned depends on python3-numpy to python3:Depends substvar. +.PP +This is needed because some Python extensions require strict versioned depends on python3-numpy, and using this helper script is the easiest and most consistent way to get them. +.PP +The helper script uses the information stored in /usr/share/numpy3/versions, and the architecture type of the package, to generate the Depends information; for a detailed description of how the dependencies are generated, please refer to /usr/share/doc/python3-numpy/README.DebianMaints . +.SH "SEE ALSO" +\fIdebhelper\fR(7) +.PP +This program is not a part of debhelper (and it's provided by python-numpy). diff --git a/debian/numpy3.pm b/debian/numpy3.pm new file mode 100644 index 000000000000..e3c2f9e4d6f3 --- /dev/null +++ b/debian/numpy3.pm @@ -0,0 +1,8 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Debian::Debhelper::Dh_Lib; + +insert_before("dh_gencontrol", "dh_numpy3"); + +1 diff --git a/debian/python-numpy-doc.lintian-overrides b/debian/python-numpy-doc.lintian-overrides new file mode 100644 index 000000000000..06954a567497 --- /dev/null +++ b/debian/python-numpy-doc.lintian-overrides @@ -0,0 +1,3 @@ +python-numpy-doc: copyright-without-copyright-notice +python-numpy-doc: initial-upload-closes-no-bugs +python-numpy-doc: zero-byte-file-in-doc-directory diff --git a/debian/python3-numpy.install b/debian/python3-numpy.install new file mode 100644 index 000000000000..02662563c870 --- /dev/null +++ b/debian/python3-numpy.install @@ -0,0 +1,5 @@ +debian/dh_numpy3 usr/bin +debian/numpy3.pm usr/share/perl5/Debian/Debhelper/Sequence/ +debian/versions usr/share/numpy3/ +usr/bin/* +usr/lib/python*/*-packages/* diff --git a/debian/python3-numpy.lintian-overrides b/debian/python3-numpy.lintian-overrides new file mode 100644 index 000000000000..7f9f57347aca --- /dev/null +++ b/debian/python3-numpy.lintian-overrides @@ -0,0 +1,8 @@ +python3-numpy: copyright-without-copyright-notice +python3-numpy: initial-upload-closes-no-bugs +python3-numpy: missing-prerequisite-for-gfortran-module +python3-numpy: no-manual-page +python3-numpy: python-module-in-wrong-location +python3-numpy: shared-library-lacks-prerequisites +python3-numpy: unusual-interpreter +python3-numpy: zero-byte-file-in-doc-directory diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000000..95e541ca2cfd --- /dev/null +++ b/debian/rules @@ -0,0 +1,51 @@ +#!/usr/bin/make -f + +SHELL := /bin/bash + +export DH_VERBOSE=1 + +PY3VERS=$(shell py3versions -vr) +PY3DEF=$(shell py3versions -dv) +PY3LIBPATH := $(shell python3 -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print (b.build_platlib)") + +# Look at #634012 to understand why is needed and what will happen if we set +# compat to 9 +unexport LDFLAGS +export ATLAS=None + +# https://github.com/numpy/numpy/pull/20695 +export NPY_DISABLE_SVML=1 + +%: + dh $@ --with python3 --buildsystem=pybuild + +override_dh_auto_clean: + +override_dh_installman: + dh_installman -ppython-numpy-doc debian/dh_numpy3.1 + +override_dh_install: + # install numpy.i into the include directory + cp -a tools/swig/numpy.i debian/tmp/usr/lib/python$(PY3DEF)/dist-packages/numpy/core/include/numpy + + dh_install + + # create symlinks for .h files + set -e; for i in $(PY3DEF); do \ + ABITAG=`python$$i -c "import sys; print(sys.abiflags)"`; \ + [ -d $(CURDIR)/debian/python3-numpy/usr/include/python$$i$$ABITAG ] || \ + mkdir -p $(CURDIR)/debian/python3-numpy/usr/include/python$$i$$ABITAG; \ + dh_link -ppython3-numpy usr/lib/python3/dist-packages/numpy/core/include/numpy usr/include/python$$i$$ABITAG/numpy; \ + done + +override_dh_gencontrol: + python3 debian/versions3.helper >> debian/python3-numpy.substvars + dh_gencontrol + +override_dh_auto_test: + +override_dh_auto_install: + dh_auto_install + + # Install for Python 3 + python3 setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000000..163aaf8d82b6 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides new file mode 100644 index 000000000000..1f057dbec289 --- /dev/null +++ b/debian/source/lintian-overrides @@ -0,0 +1,5 @@ +python-numpy source: file-without-copyright-information +python-numpy source: no-debian-changes +python-numpy source: source-contains-prebuilt-windows-binary +python-numpy source: source-is-missing +python-numpy source: source-package-encodes-python-version diff --git a/debian/versions b/debian/versions new file mode 100644 index 000000000000..477d49506152 --- /dev/null +++ b/debian/versions @@ -0,0 +1,15 @@ +# ABI version. +# This number must be changed every time C_ABI_VERSION changes. +# It's should be normally equal to C_ABI_VERSION - 0x1000000. +# Check numpy/core/setup_common.py +abi 9 + +# Minor API version. +# This number must be changed every time C_API_VERSION changes. +# It's should be normally equal to C_API_VERSION. +# Description of the changes at numpy/core/code_generators/cversions.txt +api 16 + +# Minimum version of Numpy that shares this minor API version. +# This version must be updated every time C_API_VERSION changes. +api-min-version 1:1.23.0 diff --git a/debian/versions3.helper b/debian/versions3.helper new file mode 100644 index 000000000000..cb3b42c70754 --- /dev/null +++ b/debian/versions3.helper @@ -0,0 +1,24 @@ +#!/usr/bin/python + +''' +Check if debian/versions is sane and generate substvars for numpy:Provides. +''' + +import os + +def main(): + data = {} + file = open('debian/versions', 'r') + try: + for line in file: + line = line.strip() + if not line or line.startswith('#'): + continue + key, value = line.split(None, 1) + data[key] = value + finally: + file.close() + print('numpy3:Provides=python3-numpy-abi%s, python3-numpy-api%s' % (data['abi'], data['api'])) + +if __name__ == '__main__': + main() diff --git a/python-numpy.spec b/python-numpy.spec new file mode 100644 index 000000000000..cddab42d8fe9 --- /dev/null +++ b/python-numpy.spec @@ -0,0 +1,195 @@ +# Copyright 2024 Wong Hoi Sing Edison +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +%global debug_package %{nil} + +%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects + +Name: python-numpy +Epoch: 100 +Version: 1.26.1 +Release: 1%{?dist} +Summary: Fundamental package for array computing with Python +License: BSD-3-Clause +URL: https://github.com/numpy/numpy/tags +Source0: %{name}_%{version}.orig.tar.gz +BuildRequires: fdupes +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: gcc-gfortran +BuildRequires: git +BuildRequires: lapack-devel +BuildRequires: openblas-devel +BuildRequires: python-rpm-macros +BuildRequires: python3-Cython +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +%description +NumPy is the fundamental package for scientific computing with Python. + +%prep +%autosetup -T -c -n %{name}_%{version}-%{release} +tar -zx -f %{S:0} --strip-components=1 -C . + +%build +export CFLAGS="%{optflags} -fno-strict-aliasing" +%{__python3} setup.py build + +%install +export CFLAGS="%{optflags} -fno-strict-aliasing" +%{__python3} setup.py install --root %{buildroot} +find %{buildroot}%{python3_sitearch} -type f -name '*.pyc' -exec rm -rf {} \; +fdupes -qnrps %{buildroot}%{python3_sitearch} + +%check + +%if 0%{?suse_version} > 1500 +%package -n python%{python3_version_nodots}-numpy +Summary: Fundamental package for array computing with Python +Requires: python3 +Provides: python3-numpy = %{epoch}:%{version}-%{release} +Provides: python3dist(numpy) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}-numpy = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}dist(numpy) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}-numpy = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}dist(numpy) = %{epoch}:%{version}-%{release} + +%description -n python%{python3_version_nodots}-numpy +NumPy is the fundamental package for scientific computing with Python. + +%package -n python%{python3_version_nodots}-numpy-devel +Summary: Development files for numpy applications +Requires: lapack-devel +Requires: openblas-devel +Requires: python3-devel +Requires: python%{python3_version_nodots}-numpy = %{epoch}:%{version}-%{release} +Provides: python3-numpy-devel = %{epoch}:%{version}-%{release} +Provides: python3dist(numpy-devel) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}-numpy-devel = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}dist(numpy-devel) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}-numpy-devel = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}dist(numpy-devel) = %{epoch}:%{version}-%{release} + +%description -n python%{python3_version_nodots}-numpy-devel +This package contains files for developing applications using numpy. + +%files -n python%{python3_version_nodots}-numpy +%license LICENSE.txt +%{_bindir}/* +%{python3_sitearch}/* +%exclude %{python3_sitearch}/numpy/core/include/ +%exclude %{python3_sitearch}/numpy/core/lib/libnpymath.a +%exclude %{python3_sitearch}/numpy/random/lib/libnpyrandom.a +%exclude %{python3_sitearch}/numpy/distutils/*/*.c +%exclude %{python3_sitearch}/numpy/f2py/src/ + +%files -n python%{python3_version_nodots}-numpy-devel +%{python3_sitearch}/numpy/core/include/ +%{python3_sitearch}/numpy/core/lib/libnpymath.a +%{python3_sitearch}/numpy/random/lib/libnpyrandom.a +%{python3_sitearch}/numpy/distutils/*/*.c +%{python3_sitearch}/numpy/f2py/src/ +%endif + +%if 0%{?sle_version} > 150000 +%package -n python3-numpy +Summary: Fundamental package for array computing with Python +Requires: python3 +Provides: python3-numpy = %{epoch}:%{version}-%{release} +Provides: python3dist(numpy) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}-numpy = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}dist(numpy) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}-numpy = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}dist(numpy) = %{epoch}:%{version}-%{release} + +%description -n python3-numpy +NumPy is the fundamental package for scientific computing with Python. + +%package -n python3-numpy-devel +Summary: Development files for numpy applications +Requires: lapack-devel +Requires: openblas-devel +Requires: python3-devel +Requires: python3-numpy = %{epoch}:%{version}-%{release} +Provides: python3-numpy-devel = %{epoch}:%{version}-%{release} +Provides: python3dist(numpy-devel) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}-numpy-devel = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}dist(numpy-devel) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}-numpy-devel = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}dist(numpy-devel) = %{epoch}:%{version}-%{release} + +%description -n python3-numpy-devel +This package contains files for developing applications using numpy. + +%files -n python3-numpy +%license LICENSE.txt +%{_bindir}/* +%{python3_sitearch}/* +%exclude %{python3_sitearch}/numpy/core/include/ +%exclude %{python3_sitearch}/numpy/core/lib/libnpymath.a +%exclude %{python3_sitearch}/numpy/random/lib/libnpyrandom.a +%exclude %{python3_sitearch}/numpy/distutils/*/*.c +%exclude %{python3_sitearch}/numpy/f2py/src/ + +%files -n python3-numpy-devel +%{python3_sitearch}/numpy/core/include/ +%{python3_sitearch}/numpy/core/lib/libnpymath.a +%{python3_sitearch}/numpy/random/lib/libnpyrandom.a +%{python3_sitearch}/numpy/distutils/*/*.c +%{python3_sitearch}/numpy/f2py/src/ +%endif + +%if !(0%{?suse_version} > 1500) && !(0%{?sle_version} > 150000) +%package -n python3-numpy +Summary: Fundamental package for array computing with Python +Requires: python3 +Provides: python3-numpy = %{epoch}:%{version}-%{release} +Provides: python3dist(numpy) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}-numpy = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}dist(numpy) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}-numpy = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}dist(numpy) = %{epoch}:%{version}-%{release} + +%description -n python3-numpy +NumPy is the fundamental package for scientific computing with Python. + +%package -n python3-numpy-f2py +Summary: f2py for numpy +Requires: python3-devel +Requires: python3-numpy = %{epoch}:%{version}-%{release} +Provides: f2py = %{epoch}:%{version}-%{release} +Provides: numpy-f2py = %{epoch}:%{version}-%{release} +Provides: python3-f2py = %{epoch}:%{version}-%{release} +Provides: python3-numpy-f2py = %{epoch}:%{version}-%{release} +Provides: python3dist(numpy-f2py) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}-numpy-f2py = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}dist(numpy-f2py) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}-numpy-f2py = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}dist(numpy-f2py) = %{epoch}:%{version}-%{release} + +%description -n python3-numpy-f2py +This package includes a version of f2py that works properly with NumPy. + +%files -n python3-numpy +%license LICENSE.txt +%{python3_sitearch}/* +%exclude %{python3_sitearch}/numpy/f2py + +%files -n python3-numpy-f2py +%{_bindir}/* +%{python3_sitearch}/numpy/f2py +%endif + +%changelog diff --git a/setup.py b/setup.py index 6bd2153d7835..10b689b23717 100755 --- a/setup.py +++ b/setup.py @@ -379,7 +379,7 @@ def parse_setuppy_commands(): good_commands = ('develop', 'sdist', 'build', 'build_ext', 'build_py', 'build_clib', 'build_scripts', 'bdist_wheel', 'bdist_rpm', 'bdist_wininst', 'bdist_msi', 'bdist_mpkg', 'build_src', - 'bdist_egg') + 'bdist_egg', 'config') for command in good_commands: if command in args: