X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=blobdiff_plain;f=python-numpy.spec;h=37931fec963cffe11198a4fbdb77d1963a9f771f;hb=f1e50122ec2eed2cef6f7d03b891dab2bc04383d;hp=04283797080970a852ce8d94a38b10659e848d50;hpb=f13fc83ccc2ab613d7c9bde2417f4b1d80e99ba5;p=packages%2Fpython-numpy.git diff --git a/python-numpy.spec b/python-numpy.spec index 0428379..37931fe 100644 --- a/python-numpy.spec +++ b/python-numpy.spec @@ -1,193 +1,318 @@ -%include /usr/lib/rpm/macros.python +# +# Conditional build: +%bcond_without python2 # CPython 2.x modules +%bcond_without python3 # CPython 3.x modules %define module numpy -%define mname Numeric - -Summary: Python numerical facilities -Summary(pl): Modu³y do obliczeñ numerycznych dla jêzyka Python +Summary: Python 2 numerical facilities +Summary(pl.UTF-8): Moduły do obliczeń numerycznych dla języka Python 2 Name: python-%{module} -Version: 23.1 -Release: 0.1 -License: distributable +Version: 1.12.1 +Release: 2 +Epoch: 1 +License: BSD Group: Libraries/Python -Source0: http://dl.sourceforge.net/numpy/%{mname}-%{version}.tar.gz -# Source0-md5: 5cd24ed20627f5cbc822a2bed8ff27e9 -URL: http://www.pfdubois.com/numpy/ -BuildRequires: python-devel >= 2.3 +#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 >= 1:2.7 +BuildRequires: python-setuptools +%endif +%if %{with python3} +BuildRequires: python3-2to3 +BuildRequires: python3-devel >= 1:3.4 +BuildRequires: python3-setuptools +%endif BuildRequires: rpm-pythonprov -%pyrequires_eq python +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 +Obsoletes: python-numpy-kinds +# old subpackage, merged into main +Obsoletes: python-numpy-FFT +# -- dropped during Numeric->numpy transition (ma in main now?) +Obsoletes: python-numpy-MA +Obsoletes: python-numpy-RNG +Obsoletes: python-Numeric +Obsoletes: python-Numeric-FFT +Obsoletes: python-Numeric-MA +Obsoletes: python-Numeric-RNG +Requires: pydoc BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description NumPy is a collection of extension modules to provide high-performance multidimensional numeric arrays to the Python programming language. -%description -l pl -Pakiet umo¿liwia wydajne obliczenia numeryczne na macierzach -wielowymiarowych. +This package contains Python 2 modules. + +%description -l pl.UTF-8 +NumPy to zbiór modułów rozszerzeń zapewniających wydajne obliczenia +numeryczne na macierzach wielowymiarowych w języku Python. + +Ten pakiet zawiera moduły Pythona 2. %package devel -Summary: C header files for numerical modules -Summary(pl): Pliki nag³ówkowe jêzyka C modu³ów numerycznych +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 -Requires: %{name} = %{version} +%pyrequires_eq python-devel +Requires: %{name} = %{epoch}:%{version}-%{release} +Obsoletes: python-Numeric-devel %description devel -C header files for numerical modules. +C header files for Python 2 numerical modules. -%description devel -l pl -Pliki nag³ówkowe jêzyka C modu³ów numerycznych. +%description devel -l pl.UTF-8 +Pliki nagłówkowe języka C modułów numerycznych Pythona 2. -%package FFT -Summary: Interface to the FFTPACK FORTRAN library -Summary(pl): Interfejs do biblioteki FFTPACK jêzyka Fortran +%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 -%pyrequires_eq python -Requires: %{name} = %{version} - -%description FFT -The FFT.py module provides a simple interface to the FFTPACK FORTRAN -library, which is a powerful standard library for doing fast Fourier -transforms of real and complex data sets. - -%description FFT -l pl -Modu³ FFT zawiera prosty interfejs do biblioteki FFTPACK jêzyka -Fortran. Ta biblioteka o wysokich mo¿liwo¶ciach jest standardowo -u¿ywana do prowadzenia obliczeñ za pomoc± dyskretnej transformaty -Fouriera na liczba rzeczywistych i zespolonych. - -# -- will be released as separate package -#%package kinds -#Summary: Implementation of PEP 0242 - precision and range control of numeric computations -#Summary(pl): Implementacja propozycji PEP 0242 - mo¿liwo¶æ kontrolowania precyzji i zakresu obliczeñ numerycznych -#Group: Libraries/Python -#%pyrequires_eq python -#Requires: %{name} = %{version} -# -#%description kinds -#This is implementation of PEP 0242. PEP's abstract follows: -# -#This proposal gives the user optional control over the precision and -#range of numeric computations so that a computation can be written -#once and run anywhere with at least the desired precision and range. -#It is backward compatible with existing code. -# -#%description kinds -l pl -#Modu³ zawiera implementacjê propozycji PEP 0242. Oto jej streszczenie. -# -#Propozycja ta umo¿liwia u¿ytkownikowi, opcjonalnie, kontrolê nad -#precyzj± i zakresem obliczeñ numerycznych. Dziêki temu raz napisane -#obliczenia mog± byæ uruchamiane na dowolnej maszynie. Mechanizm jest -#kompatybilny wstecz z istniej±cymi programami. - -%package MA -Summary: MA - a facility for dealing with masked arrays -Summary(pl): Modu³ do obs³ugi macierzy niepe³nych +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 -%pyrequires_eq python -Requires: %{name} = %{version} - -%description MA -Masked arrays are arrays that may have missing or invalid entries. -Module MA provides a work-alike replacement for Numeric that supports -data arrays with masks. - -%description MA -l pl -Macierze niepe³ne s± to macierze, którym mo¿e brakowaæ lub mog± -zawieraæ niepoprawne warto¶ci. Modu³ MA zawiera odpowiednie narzêdzia -do operowania na tego typu macierzach. - -# -- removed(?) -#%package Properties -#Summary: Property class implementation for Python -#Summary(pl): Implementacja klasy z w³a¶ciwo¶ciami dla jêzyka Python -#Group: Libraries/Python -#%pyrequires_eq python -#Requires: %{name} = %{version} -# -#%description Properties -#PropertiedClass is a mixin class that can be used to emulate -#properties in a Python class. A property is an attribute whose read, -#write, or deleting requires special handling. It is also possible to -#use this facility to prevent the writing or deleting of a property. -# -#%description Properties -l pl -#PropertiedClass jest klas±, która mo¿e byæ u¿yta do emulacji -#w³a¶ciwo¶ci w klasach jêzyka Python. W³a¶ciwo¶æ klasy jest atrybutem, -#którego czytanie, przypisywanie mu warto¶ci, czy te¿ jego usuwanie -#powinno byæ traktowane w sposób specjalny. Mechanizm ten mo¿e byæ te¿ -#u¿ywany w celu ustalenia jakiego¶ atrybutu jako tylko do odczytu. - -%package RNG -Summary: Random Number Generator Object for NumPy -Summary(pl): Obiekt generatora liczb losowych dla modu³u NumPy +Requires: python3-libs >= 1:3.4 + +%description -n python3-%{module} +NumPy is a collection of extension modules to provide high-performance +multidimensional numeric arrays to the Python programming language. + +This package contains Python 3 modules. + +%description -l pl.UTF-8 -n python3-%{module} +NumPy to zbiór modułów rozszerzeń zapewniających wydajne obliczenia +numeryczne na macierzach wielowymiarowych w języku Python. + +Ten pakiet zawiera moduły Pythona 3. + +%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 python3-devel +Requires: python3-%{module} = %{epoch}:%{version}-%{release} +Obsoletes: python-Numeric-devel + +%description -n python3-%{module}-devel +C header files for Python 3 numerical modules. + +%description -n python3-%{module}-devel -l pl.UTF-8 +Pliki nagłówkowe języka C modułów numerycznych Pythona 3. + +%package -n f2py3 +Summary: Fortran to Python 3 interface generator +Summary(pl.UTF-8): Generator interfejsów z Fortranu do Pythona 3 Group: Libraries/Python -%pyrequires_eq python -Requires: %{name} = %{version} +Requires: python3-%{module} = %{epoch}:%{version}-%{release} -%description RNG -RNG provides a random number object to Numerical Python. +%description -n f2py3 +Fortran to Python 3 interface generator. -%description RNG -l pl -Modu³ ten zawiera implementacjê obiektu generatora liczb losowych dla -jêzyka Python. +%description -n f2py3 -l pl.UTF-8 +Generator interfejsów z Fortranu do Pythona 3. %prep -%setup -q -n %{mname}-%{version} +%setup -q -n %{module}-%{version} +%patch0 -p1 %build -CC="%{__cc}"; export CC -CFLAGS="%{rpmcflags}"; export CFLAGS -python setup.py build +# 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} +%py_build +%endif + +%if %{with python3} +%py3_build +%endif %install rm -rf $RPM_BUILD_ROOT -python setup.py install \ - --root=$RPM_BUILD_ROOT +%if %{with python2} +%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}/*/tests + +%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/%{module}/distutils/mingw/gfortran_vs2003_hack.c +%endif + +%if %{with python3} +%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 + +%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/%{module}/distutils/mingw/gfortran_vs2003_hack.c +%endif + %clean rm -rf $RPM_BUILD_ROOT +%if %{with python2} %files %defattr(644,root,root,755) -%dir %{py_sitedir}/%{mname} -%{py_sitedir}/%{mname}.pth -%attr(755,root,root) %{py_sitedir}/%{mname}/*.so -%{py_sitedir}/%{mname}/*.py[co] +%dir %{py_sitedir}/%{module} +%{py_sitedir}/%{module}/*.py +%{py_sitedir}/%{module}/*.py[co] +%dir %{py_sitedir}/%{module}/compat +%{py_sitedir}/%{module}/compat/*.py +%{py_sitedir}/%{module}/compat/*.py[co] +%dir %{py_sitedir}/%{module}/core +%{py_sitedir}/%{module}/core/*.py +%{py_sitedir}/%{module}/core/*.py[co] +%attr(755,root,root) %{py_sitedir}/%{module}/core/*.so +%dir %{py_sitedir}/%{module}/distutils +%{py_sitedir}/%{module}/distutils/*.py +%{py_sitedir}/%{module}/distutils/*.py[co] +%dir %{py_sitedir}/%{module}/distutils/command +%{py_sitedir}/%{module}/distutils/command/*.py +%{py_sitedir}/%{module}/distutils/command/*.py[co] +%dir %{py_sitedir}/%{module}/distutils/fcompiler +%{py_sitedir}/%{module}/distutils/fcompiler/*.py +%{py_sitedir}/%{module}/distutils/fcompiler/*.py[co] +%dir %{py_sitedir}/%{module}/fft +%{py_sitedir}/%{module}/fft/*.py +%{py_sitedir}/%{module}/fft/*.py[co] +%attr(755,root,root) %{py_sitedir}/%{module}/fft/fftpack_lite.so +%dir %{py_sitedir}/%{module}/lib +%{py_sitedir}/%{module}/lib/*.py +%{py_sitedir}/%{module}/lib/*.py[co] +%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 +%{py_sitedir}/%{module}/ma/*.py[co] +%dir %{py_sitedir}/%{module}/matrixlib +%{py_sitedir}/%{module}/matrixlib/*.py +%{py_sitedir}/%{module}/matrixlib/*.py[co] +%dir %{py_sitedir}/%{module}/polynomial +%{py_sitedir}/%{module}/polynomial/*.py +%{py_sitedir}/%{module}/polynomial/*.py[co] +%dir %{py_sitedir}/%{module}/random +%{py_sitedir}/%{module}/random/*.py +%{py_sitedir}/%{module}/random/*.py[co] +%attr(755,root,root) %{py_sitedir}/%{module}/random/mtrand.so +%dir %{py_sitedir}/%{module}/testing +%{py_sitedir}/%{module}/testing/*.py +%{py_sitedir}/%{module}/testing/*.py[co] +%dir %{py_sitedir}/%{module}/tests +%{py_sitedir}/%{module}/tests/*.py +%{py_sitedir}/%{module}/tests/*.py[co] +%{py_sitedir}/numpy-%{version}-py*.egg-info %files devel %defattr(644,root,root,755) -%{py_incdir}/%{mname} +%{py_sitedir}/%{module}/core/include +%{py_sitedir}/%{module}/core/lib +%{py_sitedir}/%{module}/random/*.h -%files FFT +%files -n f2py %defattr(644,root,root,755) -%dir %{py_sitedir}/%{mname}/FFT -%attr(755,root,root) %{py_sitedir}/%{mname}/FFT/*.so -%{py_sitedir}/%{mname}/FFT/*.py[co] +%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 -#%files kinds -#%defattr(644,root,root,755) -#%dir %{py_sitedir}/%{mname}/kinds -#%attr(755,root,root) %{py_sitedir}/%{mname}/kinds/*.so -#%{py_sitedir}/%{mname}/kinds/*.py[co] - -%files MA +%if %{with python3} +%files -n python3-%{module} %defattr(644,root,root,755) -%dir %{py_sitedir}/%{mname}/MA -%{py_sitedir}/%{mname}/MA/*.py[co] +%dir %{py3_sitedir}/%{module} +%{py3_sitedir}/%{module}/*.py +%{py3_sitedir}/%{module}/__pycache__ +%dir %{py3_sitedir}/%{module}/compat +%{py3_sitedir}/%{module}/compat/*.py +%{py3_sitedir}/%{module}/compat/__pycache__ +%dir %{py3_sitedir}/%{module}/core +%{py3_sitedir}/%{module}/core/*.py +%{py3_sitedir}/%{module}/core/__pycache__ +%attr(755,root,root) %{py3_sitedir}/%{module}/core/*.cpython-3*.so +%dir %{py3_sitedir}/%{module}/distutils +%{py3_sitedir}/%{module}/distutils/*.py +%{py3_sitedir}/%{module}/distutils/__pycache__ +%dir %{py3_sitedir}/%{module}/distutils/command +%{py3_sitedir}/%{module}/distutils/command/*.py +%{py3_sitedir}/%{module}/distutils/command/__pycache__ +%dir %{py3_sitedir}/%{module}/distutils/fcompiler +%{py3_sitedir}/%{module}/distutils/fcompiler/*.py +%{py3_sitedir}/%{module}/distutils/fcompiler/__pycache__ +%dir %{py3_sitedir}/%{module}/fft +%{py3_sitedir}/%{module}/fft/*.py +%{py3_sitedir}/%{module}/fft/__pycache__ +%attr(755,root,root) %{py3_sitedir}/%{module}/fft/fftpack_lite.cpython-3*.so +%dir %{py3_sitedir}/%{module}/lib +%{py3_sitedir}/%{module}/lib/*.py +%{py3_sitedir}/%{module}/lib/__pycache__ +%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}/ma/__pycache__ +%dir %{py3_sitedir}/%{module}/matrixlib +%{py3_sitedir}/%{module}/matrixlib/*.py +%{py3_sitedir}/%{module}/matrixlib/__pycache__ +%dir %{py3_sitedir}/%{module}/polynomial +%{py3_sitedir}/%{module}/polynomial/*.py +%{py3_sitedir}/%{module}/polynomial/__pycache__ +%dir %{py3_sitedir}/%{module}/random +%{py3_sitedir}/%{module}/random/*.py +%{py3_sitedir}/%{module}/random/__pycache__ +%attr(755,root,root) %{py3_sitedir}/%{module}/random/mtrand.cpython-3*.so +%dir %{py3_sitedir}/%{module}/testing +%{py3_sitedir}/%{module}/testing/*.py +%{py3_sitedir}/%{module}/testing/__pycache__ +%dir %{py3_sitedir}/%{module}/tests +%{py3_sitedir}/%{module}/tests/*.py +%{py3_sitedir}/%{module}/tests/__pycache__ +%{py3_sitedir}/numpy-%{version}-py*.egg-info -#%files Properties -#%defattr(644,root,root,755) -#%dir %{py_sitedir}/%{mname}/PropertiedClasses -#%{py_sitedir}/%{mname}/PropertiedClasses/*.py[co] +%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 -%files RNG +%files -n f2py3 %defattr(644,root,root,755) -%dir %{py_sitedir}/%{mname}/RNG -%attr(755,root,root) %{py_sitedir}/%{mname}/RNG/*.so -%{py_sitedir}/%{mname}/RNG/*.py[co] +%attr(755,root,root) %{_bindir}/f2py3 +%dir %{py3_sitedir}/%{module}/f2py +%{py3_sitedir}/%{module}/f2py/*.py +%{py3_sitedir}/%{module}/f2py/__pycache__ +%{py3_sitedir}/%{module}/f2py/src +%endif