Summary: Python 2 numerical facilities
Summary(pl.UTF-8): Moduły do obliczeń numerycznych dla języka Python 2
Name: python-%{module}
-Version: 1.7.2
-Release: 1
+Version: 1.12.1
+Release: 2
Epoch: 1
License: BSD
Group: Libraries/Python
-Source0: http://downloads.sourceforge.net/numpy/%{module}-%{version}.tar.gz
-# Source0-md5: 6eba32e71bd30cf70b9ea2ef28519d9a
+#Source0Download: https://github.com/numpy/numpy/releases/
+Source0: https://github.com/numpy/numpy/releases/download/v%{version}/%{module}-%{version}.tar.gz
+# Source0-md5: 2abe6efb8ea0ac1716d1fc5fa90cbacf
Patch0: %{name}-fortran-version.patch
URL: http://sourceforge.net/projects/numpy/
+BuildRequires: gcc-fortran
+BuildRequires: lapack-devel >= 3.1.1-2
%if %{with python2}
-BuildRequires: python-devel
-%pyrequires_eq python-libs
+BuildRequires: python-devel >= 1:2.7
+BuildRequires: python-setuptools
%endif
%if %{with python3}
-BuildRequires: python3-devel >= 1:3.3
BuildRequires: python3-2to3
+BuildRequires: python3-devel >= 1:3.4
+BuildRequires: python3-setuptools
%endif
-BuildRequires: gcc-fortran
-BuildRequires: lapack-devel >= 3.1.1-2
BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+Requires: python-libs >= 1:2.7
# -- dropped some time ago
Obsoletes: python-numpy-Properties
# -- dropped some time ago, should have been released as separate package, but wasn't
Ten pakiet zawiera moduły Pythona 2.
+%package devel
+Summary: C header files for Python 2 numerical modules
+Summary(pl.UTF-8): Pliki nagłówkowe języka C modułów numerycznych Pythona 2
+Group: Development/Languages/Python
+%pyrequires_eq python-devel
+Requires: %{name} = %{epoch}:%{version}-%{release}
+Obsoletes: python-Numeric-devel
+
+%description devel
+C header files for Python 2 numerical modules.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe języka C modułów numerycznych Pythona 2.
+
+%package -n f2py
+Summary: Fortran to Python 2 interface generator
+Summary(pl.UTF-8): Generator interfejsów z Fortranu do Pythona 2
+Group: Libraries/Python
+Requires: %{name} = %{epoch}:%{version}-%{release}
+
+%description -n f2py
+Fortran to Python 2 interface generator.
+
+%description -n f2py -l pl.UTF-8
+Generator interfejsów z Fortranu do Pythona 2.
+
%package -n python3-%{module}
Summary: Python 3.x numerical facilities
Summary(pl.UTF-8): Moduły do obliczeń numerycznych dla języka Python 3.x
Group: Libraries/Python
+Requires: python3-libs >= 1:3.4
%description -n python3-%{module}
NumPy is a collection of extension modules to provide high-performance
Ten pakiet zawiera moduły Pythona 3.
-%package devel
-Summary: C header files for Python 2 numerical modules
-Summary(pl.UTF-8): Pliki nagłówkowe języka C modułów numerycznych Pythona 2
-Group: Development/Languages/Python
-%pyrequires_eq python-devel
-Requires: %{name} = %{epoch}:%{version}-%{release}
-Obsoletes: python-Numeric-devel
-
-%description devel
-C header files for Python 2 numerical modules.
-
-%description devel -l pl.UTF-8
-Pliki nagłówkowe języka C modułów numerycznych Pythona 2.
-
%package -n python3-%{module}-devel
Summary: C header files for Python 3 numerical modules
Summary(pl.UTF-8): Pliki nagłówkowe języka C modułów numerycznych Pythona 3
Group: Development/Languages/Python
-%pyrequires_eq python-devel
+%pyrequires_eq python3-devel
Requires: python3-%{module} = %{epoch}:%{version}-%{release}
Obsoletes: python-Numeric-devel
%description -n python3-%{module}-devel -l pl.UTF-8
Pliki nagłówkowe języka C modułów numerycznych Pythona 3.
-%package numarray
-Summary: Array manipulation and computations for Python 2
-Summary(pl.UTF-8): Operacje i obliczenia na tablicach dla Pythona 2
-Group: Development/Languages/Python
-Requires: %{name} = %{epoch}:%{version}-%{release}
-
-%description numarray
-Numarray provides array manipulation and computational capabilities
-similar to those found in IDL, Matlab, or Octave. Using numarray, it
-is possible to write many efficient numerical data processing
-applications directly in Python without using any C, C++ or Fortran
-code (as well as doing such analysis interactively within Python or
-PyRAF). For algorithms that are not well suited for efficient
-computation using array facilities it is possible to write C functions
-(and eventually Fortran) that can read and write numarray arrays that
-can be called from Python.
-
-Numarray is a re-implementation of an older Python array module called
-Numeric. In general its interface is very similar. It is mostly
-backward compatible and will be becoming more so in future releases.
-
-This package contains Python 2 module.
-
-%description numarray -l pl.UTF-8
-Numarray zapewnia narzędzia do operacji oraz obliczeń na tablicach
-podobne do tych, jakie zapewniają IDL, Matlab czy Octave. Używając
-numarray możliwe jest stworzenie bezpośrednio w Pythonie, nie używając
-wstawek C, C++ czy fortranowych, wielu wydajnych aplikacji do
-przetwarzania danych numerycznych. Dla algorytmów, które nie pracują
-wydajnie z tablicami, możliwe jest napisanie funkcji C, które mogą
-czytać i zapisywać tablice numarray, i które mogą być wywoływane z
-poziomu Pythona.
-
-Numarray jest ponowną implementacją starszego modułu Pythona -
-Numeric. Interfejsy tych modułów są do siebie bardzo podobne. Numarray
-jest w większości przypadków kompatybilny wstecz, a sytuacja poprawi
-się w nowszych wersjach.
-
-Ten pakiet zawiera moduł Pythona 2.
-
-%package -n python3-%{module}-numarray
-Summary: Array manipulation and computations for Python 3.x
-Summary(pl.UTF-8): Operacje i obliczenia na tablicach dla Pythona 3.x
-Group: Development/Languages/Python
-Requires: python3-%{module} = %{epoch}:%{version}-%{release}
-
-%description -n python3-%{module}-numarray
-Numarray provides array manipulation and computational capabilities
-similar to those found in IDL, Matlab, or Octave. Using numarray, it
-is possible to write many efficient numerical data processing
-applications directly in Python without using any C, C++ or Fortran
-code (as well as doing such analysis interactively within Python or
-PyRAF). For algorithms that are not well suited for efficient
-computation using array facilities it is possible to write C functions
-(and eventually Fortran) that can read and write numarray arrays that
-can be called from Python.
-
-Numarray is a re-implementation of an older Python array module called
-Numeric. In general its interface is very similar. It is mostly
-backward compatible and will be becoming more so in future releases.
-
-This package contains Python 3 module.
-
-%description -n python3-%{module}-numarray -l pl.UTF-8
-Numarray zapewnia narzędzia do operacji oraz obliczeń na tablicach
-podobne do tych, jakie zapewniają IDL, Matlab czy Octave. Używając
-numarray możliwe jest stworzenie bezpośrednio w Pythonie, nie używając
-wstawek C, C++ czy fortranowych, wielu wydajnych aplikacji do
-przetwarzania danych numerycznych. Dla algorytmów, które nie pracują
-wydajnie z tablicami, możliwe jest napisanie funkcji C, które mogą
-czytać i zapisywać tablice numarray, i które mogą być wywoływane z
-poziomu Pythona.
-
-Numarray jest ponowną implementacją starszego modułu Pythona -
-Numeric. Interfejsy tych modułów są do siebie bardzo podobne. Numarray
-jest w większości przypadków kompatybilny wstecz, a sytuacja poprawi
-się w nowszych wersjach.
-
-Ten pakiet zawiera moduł Pythona 3.
-
-%package numarray-devel
-Summary: Header files for python-numarray
-Summary(pl.UTF-8): Pliki nagłówkowe dla pakietu python-numarray
-Group: Development/Libraries
-Requires: %{name}-devel = %{epoch}:%{version}-%{release}
-Requires: %{name}-numarray = %{epoch}:%{version}-%{release}
-
-%description numarray-devel
-Header files for python-numarray.
-
-%description numarray-devel -l pl.UTF-8
-Pliki nagłówkowe dla pakietu python-numarray.
-
-%package -n python3-%{module}-numarray-devel
-Summary: Header files for python3-numarray
-Summary(pl.UTF-8): Pliki nagłówkowe dla pakietu python3-numarray
-Group: Development/Libraries
-Requires: python3-%{module}-devel = %{epoch}:%{version}-%{release}
-Requires: python3-%{module}-numarray = %{epoch}:%{version}-%{release}
-
-%description -n python3-%{module}-numarray-devel
-Header files for python3-numarray.
-
-%description -n python3-%{module}-numarray-devel -l pl.UTF-8
-Pliki nagłówkowe dla pakietu python3-numarray.
-
-%package oldnumeric
-Summary: Python 2 modules providing backward compatibility with old Numeric packages
-Summary(pl.UTF-8): Moduły Pythona 2 zapewniające wsteczną kompatybilność ze starymi pakietami Numeric
-Group: Libraries/Python
-Requires: %{name} = %{epoch}:%{version}-%{release}
-
-%description oldnumeric
-Python 2 modules providing backward compatibility with old Numeric
-packages.
-
-%description oldnumeric -l pl.UTF-8
-Moduły Pythona 2 zapewniające wsteczną kompatybilność ze starymi
-pakietami Numeric.
-
-%package -n python3-%{module}-oldnumeric
-Summary: Python 3 modules providing backward compatibility with old Numeric packages
-Summary(pl.UTF-8): Moduły Pythona 3 zapewniające wsteczną kompatybilność ze starymi pakietami Numeric
-Group: Libraries/Python
-Requires: python3-%{module} = %{epoch}:%{version}-%{release}
-
-%description -n python3-%{module}-oldnumeric
-Python 3 modules providing backward compatibility with old Numeric
-packages.
-
-%description -n python3-%{module}-oldnumeric -l pl.UTF-8
-Moduły Pythona 3 zapewniające wsteczną kompatybilność ze starymi
-pakietami Numeric.
-
-%package -n f2py
-Summary: Fortran to Python 2 interface generator
-Summary(pl.UTF-8): Generator interfejsów z Fortranu do Pythona 2
-Group: Libraries/Python
-Requires: %{name} = %{epoch}:%{version}-%{release}
-
-%description -n f2py
-Fortran to Python 2 interface generator.
-
-%description -n f2py -l pl.UTF-8
-Generator interfejsów z Fortranu do Pythona 2.
-
%package -n f2py3
Summary: Fortran to Python 3 interface generator
Summary(pl.UTF-8): Generator interfejsów z Fortranu do Pythona 3
%patch0 -p1
%build
-CC="%{__cc}"; export CC
-CFLAGS="%{rpmcflags}"; export CFLAGS
+# numpy.distutils uses CFLAGS/LDFLAGS as its own flags replacements,
+# instead of appending proper options (like -fPIC/-shared resp.)
+CFLAGS="%{rpmcflags} -fPIC"
+LDFLAGS="%{rpmldflags} -shared"
%if %{with python2}
-%{__python} setup.py build
+%py_build
%endif
%if %{with python3}
-%{__python3} setup.py build
+%py3_build
%endif
%install
rm -rf $RPM_BUILD_ROOT
%if %{with python2}
-%{__python} setup.py install \
- --root=$RPM_BUILD_ROOT
+%py_install
%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
%py_comp $RPM_BUILD_ROOT%{py_sitedir}
%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/doc
-%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/*/{benchmarks,tests,docs}
-# already in f2py package
-%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/%{module}/f2py/f2py.1
+%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/%{module}/*/tests
%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/%{module}/distutils/mingw/gfortran_vs2003_hack.c
%endif
%if %{with python3}
-%{__python3} setup.py install \
- --root=$RPM_BUILD_ROOT
+%py3_install
%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/doc
-%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/*/{tests,docs}
-# already in f2py package
-%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/f2py/f2py.1
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/*/tests
%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/distutils/mingw/gfortran_vs2003_hack.c
%endif
-
%clean
rm -rf $RPM_BUILD_ROOT
%dir %{py_sitedir}/%{module}/lib
%{py_sitedir}/%{module}/lib/*.py
%{py_sitedir}/%{module}/lib/*.py[co]
-%attr(755,root,root) %{py_sitedir}/%{module}/lib/_compiled_base.so
%dir %{py_sitedir}/%{module}/linalg
%{py_sitedir}/%{module}/linalg/*.py
%{py_sitedir}/%{module}/linalg/*.py[co]
+%attr(755,root,root) %{py_sitedir}/%{module}/linalg/_umath_linalg.so
%attr(755,root,root) %{py_sitedir}/%{module}/linalg/lapack_lite.so
%dir %{py_sitedir}/%{module}/ma
%{py_sitedir}/%{module}/ma/*.py
%dir %{py_sitedir}/%{module}/tests
%{py_sitedir}/%{module}/tests/*.py
%{py_sitedir}/%{module}/tests/*.py[co]
-%if "%{py_ver}" > "2.4"
%{py_sitedir}/numpy-%{version}-py*.egg-info
-%endif
+
+%files devel
+%defattr(644,root,root,755)
+%{py_sitedir}/%{module}/core/include
+%{py_sitedir}/%{module}/core/lib
+%{py_sitedir}/%{module}/random/*.h
+
+%files -n f2py
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/f2py2
+%dir %{py_sitedir}/%{module}/f2py
+%{py_sitedir}/%{module}/f2py/*.py
+%{py_sitedir}/%{module}/f2py/*.py[co]
+%{py_sitedir}/%{module}/f2py/src
%endif
%if %{with python3}
%dir %{py3_sitedir}/%{module}/lib
%{py3_sitedir}/%{module}/lib/*.py
%{py3_sitedir}/%{module}/lib/__pycache__
-%attr(755,root,root) %{py3_sitedir}/%{module}/lib/_compiled_base.cpython-3*.so
%dir %{py3_sitedir}/%{module}/linalg
%{py3_sitedir}/%{module}/linalg/*.py
%{py3_sitedir}/%{module}/linalg/__pycache__
+%attr(755,root,root) %{py3_sitedir}/%{module}/linalg/_umath_linalg.cpython-3*.so
%attr(755,root,root) %{py3_sitedir}/%{module}/linalg/lapack_lite.cpython-3*.so
%dir %{py3_sitedir}/%{module}/ma
%{py3_sitedir}/%{module}/ma/*.py
%{py3_sitedir}/%{module}/tests/*.py
%{py3_sitedir}/%{module}/tests/__pycache__
%{py3_sitedir}/numpy-%{version}-py*.egg-info
-%endif
-
-%if %{with python2}
-%files devel
-%defattr(644,root,root,755)
-%{py_sitedir}/%{module}/core/include
-%{py_sitedir}/%{module}/core/lib
-%{py_sitedir}/%{module}/random/*.h
-%endif
-%if %{with python3}
%files -n python3-%{module}-devel
%defattr(644,root,root,755)
%{py3_sitedir}/%{module}/core/include
%{py3_sitedir}/%{module}/core/lib
%{py3_sitedir}/%{module}/random/*.h
-%endif
-
-%if %{with python2}
-%files numarray
-%defattr(644,root,root,755)
-%dir %{py_sitedir}/%{module}/numarray
-%{py_sitedir}/%{module}/numarray/*.py
-%{py_sitedir}/%{module}/numarray/*.py[co]
-%attr(755,root,root) %{py_sitedir}/%{module}/numarray/_capi.so
-%endif
-%if %{with python3}
-%files -n python3-%{module}-numarray
-%defattr(644,root,root,755)
-%dir %{py3_sitedir}/%{module}/numarray
-%{py3_sitedir}/%{module}/numarray/*.py
-%{py3_sitedir}/%{module}/numarray/__pycache__
-%attr(755,root,root) %{py3_sitedir}/%{module}/numarray/_capi.cpython-3*.so
-%endif
-
-%if %{with python2}
-%files numarray-devel
-%defattr(644,root,root,755)
-%{py_sitedir}/%{module}/numarray/include
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}-numarray-devel
-%defattr(644,root,root,755)
-%{py3_sitedir}/%{module}/numarray/include
-%endif
-
-%if %{with python2}
-%files oldnumeric
-%defattr(644,root,root,755)
-%dir %{py_sitedir}/%{module}/oldnumeric
-%{py_sitedir}/%{module}/oldnumeric/*.py
-%{py_sitedir}/%{module}/oldnumeric/*.py[co]
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}-oldnumeric
-%defattr(644,root,root,755)
-%dir %{py3_sitedir}/%{module}/oldnumeric
-%{py3_sitedir}/%{module}/oldnumeric/*.py
-%{py3_sitedir}/%{module}/oldnumeric/__pycache__
-%endif
-
-%if %{with python2}
-%files -n f2py
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/f2py
-%dir %{py_sitedir}/%{module}/f2py
-%{py_sitedir}/%{module}/f2py/*.py
-%{py_sitedir}/%{module}/f2py/*.py[co]
-%{py_sitedir}/%{module}/f2py/src
-%endif
-
-%if %{with python3}
%files -n f2py3
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/f2py3