Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 7b77bba86d4b6b1a5b526152d2673f5a > files > 2

python-numpy-1.8.0-1.mga4.src.rpm

%define enable_atlas 0
%{?_with_atlas: %global enable_atlas 1}

%define module	numpy
%define name	python-%{module}
%define version 1.8.0
%define release %mkrel 1
%define epoch 	1

# disable this for bootstrapping nose and sphinx
# there is no python3-nose yet
%define enable_tests 0
%define enable_doc 0


Summary:	A fast multidimensional array facility for Python
Name:		python-%{module}
Version:	%{version}
Epoch:		%{epoch}
Release:	%{release}
License:	BSD
Group:		Development/Python
Url: 		http://numpy.scipy.org
Source0:	http://downloads.sourceforge.net/numpy/%{module}-%{version}.tar.gz
Provides:	f2py
Obsoletes:	f2py
%if %enable_atlas
BuildRequires:	libatlas-devel
%else
BuildRequires:	blas-devel
%endif
BuildRequires:	lapack-devel
BuildRequires:	gcc-gfortran >= 4.0
%if %enable_doc
BuildRequires:	python-sphinx >= 1.0
BuildRequires:	python-matplotlib
%endif
%if %enable_tests
BuildRequires:	python-nose
%endif
BuildRequires:	pkgconfig(python)
BuildRequires:	python-cython
BuildRequires:	python-setuptools
BuildRequires:	pkgconfig(python3)
BuildRequires:	python3-setuptools

Obsoletes:	python-numeric < 24.2-8
Provides:	python-numeric

%description
Numpy is a general-purpose array-processing package designed to
efficiently manipulate large multi-dimensional arrays of arbitrary
records without sacrificing too much speed for small multi-dimensional
arrays. Numpy is built on the Numeric code base and adds features
introduced by numarray as well as an extended C-API and the ability to
create arrays of arbitrary type.

Numpy also provides facilities for basic linear algebra routines,
basic Fourier transforms, and random number generation.

%package devel
Summary:	Numpy headers and development tools
Group:		Development/Python
Requires:	%{name} = %{epoch}:%{version}-%{release}
Obsoletes:      python-numeric-devel < 2.8
Provides:       python-numeric-devel = %epoch:%version-%release

%description devel
This package contains tools and header files need to develop modules 
in C and Fortran that can interact with Numpy

%package -n python3-numpy
Summary:        A fast multidimensional array facility for Python3
Group:		Development/Python
License:        BSD

%description -n python3-numpy
Numpy is a general-purpose array-processing package designed to
efficiently manipulate large multi-dimensional arrays of arbitrary
records without sacrificing too much speed for small multi-dimensional
arrays. Numpy is built on the Numeric code base and adds features
introduced by numarray as well as an extended C-API and the ability to
create arrays of arbitrary type.

Numpy also provides facilities for basic linear algebra routines,
basic Fourier transforms, and random number generation.

%package -n python3-numpy-devel
Summary:	Numpy headers and development tools
Group:		Development/Python
Requires:	python3-numpy = %{epoch}:%{version}-%{release}
Obsoletes:      python3-numeric-devel < 2.8
Provides:       python3-numeric-devel = %epoch:%version-%release

%description -n python3-numpy-devel
This package contains tools and header files need to develop modules 
in C and Fortran that can interact with Numpy

%prep
%setup -q -n %{module}-%{version}
# workaround for rhbz#849713
# http://mail.scipy.org/pipermail/numpy-discussion/2012-July/063530.html
rm numpy/distutils/command/__init__.py && touch numpy/distutils/command/__init__.py
rm -rf %{py3dir}
cp -a . %{py3dir}

%build
pushd %{py3dir}
env ATLAS=%{_libdir} FFTW=%{_libdir} BLAS=%{_libdir} \
    LAPACK=%{_libdir} CFLAGS="%{optflags} -fPIC -O3" \
    %{__python3} setup.py build
popd

#CFLAGS="%{optflags} -fPIC -O3" PYTHONDONTWRITEBYTECODE= %{__python} setup.py config_fc --fcompiler=gnu95 build
env ATLAS=%{_libdir} FFTW=%{_libdir} BLAS=%{_libdir} \
    LAPACK=%{_libdir} CFLAGS="%{optflags} -fPIC -O3" \
    %{__python} setup.py build

%if %enable_doc
pushd doc
export PYTHONPATH=`dir -d ../build/lib.linux*`
%make html
popd
%endif

%install
# first install python3 so the binaries are overwritten by the python2 ones
pushd %{py3dir}
#%{__python} setup.py install -O1 --skip-build --root %{buildroot}
# skip-build currently broken, this works around it for now
env ATLAS=%{_libdir} FFTW=%{_libdir} BLAS=%{_libdir} \
    LAPACK=%{_libdir} CFLAGS="%{optflags} -fPIC -O3" \
    %{__python3} setup.py install --root %{buildroot}
%__rm -rf docs-f2py ; mv %{buildroot}%{python3_sitearch}/%{module}/f2py/docs docs-f2py
%__mv -f %{buildroot}%{python3_sitearch}/%{module}/f2py/f2py.1 f2py.1
%__rm -rf doc ; mv -f %{buildroot}%{python3_sitearch}/%{module}/doc .
install -D -p -m 0644 f2py.1 %{buildroot}%{_mandir}/man1/f2py.1
pushd %{buildroot}%{_bindir} &> /dev/null
popd &> /dev/null

# Remove doc files. They should in in %doc
%__rm -f %{buildroot}%{python3_sitearch}/%{module}/COMPATIBILITY
%__rm -f %{buildroot}%{python3_sitearch}/%{module}/DEV_README.txt
%__rm -f %{buildroot}%{python3_sitearch}/%{module}/INSTALL.txt
%__rm -f %{buildroot}%{python3_sitearch}/%{module}/LICENSE.txt
%__rm -f %{buildroot}%{python3_sitearch}/%{module}/README.txt
%__rm -f %{buildroot}%{python3_sitearch}/%{module}/THANKS.txt
%__rm -f %{buildroot}%{python3_sitearch}/%{module}/site.cfg.example

popd
# skip-build currently broken, this works around it for now
env ATLAS=%{_libdir} FFTW=%{_libdir} BLAS=%{_libdir} \
    LAPACK=%{_libdir} CFLAGS="%{optflags} -fPIC -O3" \
    %{__python} setup.py install --root %{buildroot}

%__rm -rf docs-f2py; %__mv %{buildroot}%{py_platsitedir}/%{module}/f2py/docs docs-f2py
%__mv -f %{buildroot}%{py_platsitedir}/%{module}/f2py/f2py.1 f2py.1
%__install -D -p -m 0644 f2py.1 %{buildroot}%{_mandir}/man1/f2py.1

%__rm -rf %{buildroot}%{py_platsitedir}/%{module}/tools/

# Remove doc files that should be in %doc:
%__rm -f %{buildroot}%{py_platsitedir}/%{module}/COMPATIBILITY
%__rm -f %{buildroot}%{py_platsitedir}/%{module}/*.txt
%__rm -f %{buildroot}%{py_platsitedir}/%{module}/site.cfg.example

%check
%if %enable_tests

# Don't run tests from within main directory to avoid importing the uninstalled numpy stuff:
pushd doc &> /dev/null
PYTHONPATH="%{buildroot}%{py_platsitedir}" %{__python} -c "import pkg_resources, numpy; numpy.test()"
popd &> /dev/null

pushd doc &> /dev/null
PYTHONPATH="%{buildroot}%{python3_sitearch}" %{__python3} -c "import pkg_resources, numpy ; numpy.test()"
popd &> /dev/null
%endif

%files 
%doc LICENSE.txt README.txt THANKS.txt DEV_README.txt COMPATIBILITY site.cfg.example 
%if %enable_doc
%doc doc/build/html
%endif
%dir %{py_platsitedir}/%{module}
%{py_platsitedir}/%{module}/*.py*
%{py_platsitedir}/%{module}/core/ 
%{py_platsitedir}/%{module}/compat/
%{py_platsitedir}/%{module}/doc/
%exclude %{py_platsitedir}/%{module}/core/include/
%{py_platsitedir}/%{module}/fft/
%{py_platsitedir}/%{module}/lib/
%{py_platsitedir}/%{module}/linalg/
%{py_platsitedir}/%{module}/ma/
%{py_platsitedir}/%{module}/matrixlib/
%{py_platsitedir}/%{module}/numarray/
%exclude %{py_platsitedir}/%{module}/numarray/include/
%{py_platsitedir}/%{module}/oldnumeric/
%{py_platsitedir}/%{module}/polynomial/
%{py_platsitedir}/%{module}/random/
%exclude %{py_platsitedir}/%{module}/random/randomkit.h
%{py_platsitedir}/%{module}/testing/
%{py_platsitedir}/%{module}/tests/ 
%{py_platsitedir}/%{module}-*.egg-info

%files devel
%{_bindir}/f2py
%{_mandir}/man1/f2py.*
%{py_platsitedir}/%{module}/core/include/
%{py_platsitedir}/%{module}/numarray/include/
%{py_platsitedir}/%{module}/distutils/
%{py_platsitedir}/%{module}/f2py/
%{py_platsitedir}/%{module}/random/randomkit.h

%files -n python3-numpy
%doc LICENSE.txt README.txt THANKS.txt DEV_README.txt COMPATIBILITY site.cfg.example
%{python3_sitearch}/%{module}/__pycache__/*
%dir %{python3_sitearch}/%{module}
%{python3_sitearch}/%{module}/*.py*
%{python3_sitearch}/%{module}/core
%{python3_sitearch}/%{module}/distutils
%{python3_sitearch}/%{module}/fft
%{python3_sitearch}/%{module}/lib
%{python3_sitearch}/%{module}/linalg
%{python3_sitearch}/%{module}/ma
%{python3_sitearch}/%{module}/numarray
%{python3_sitearch}/%{module}/oldnumeric
%{python3_sitearch}/%{module}/random
%{python3_sitearch}/%{module}/testing
%{python3_sitearch}/%{module}/tests
%{python3_sitearch}/%{module}/compat
%{python3_sitearch}/%{module}/matrixlib
%{python3_sitearch}/%{module}/polynomial
%{python3_sitearch}/%{module}-*.egg-info

%files -n python3-numpy-devel
%{_bindir}/f2py3
%{python3_sitearch}/%{module}/f2py



%changelog
* Fri Dec 27 2013 philippem <philippem> 1:1.8.0-1.mga4
+ Revision: 560969
- Update to 1.8.0

* Tue Oct 22 2013 umeabot <umeabot> 1:1.7.1-3.mga4
+ Revision: 543984
- Mageia 4 Mass Rebuild

* Tue Oct 15 2013 pterjan <pterjan> 1:1.7.1-2.mga4
+ Revision: 498975
- Rebuild to add different pythonegg provides for python 2 and 3

  + philippem <philippem>
    - cleaning spec

* Thu Jun 27 2013 philippem <philippem> 1:1.7.1-1.mga4
+ Revision: 447337
- new upstream
- Python 3 package

* Sun Jan 13 2013 umeabot <umeabot> 1:1.6.2-2.mga3
+ Revision: 379178
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sat Sep 08 2012 philippem <philippem> 1:1.6.2-1.mga3
+ Revision: 290081
- New upstream release 1.6.2

* Fri Sep 16 2011 philippem <philippem> 1:1.6.1-2.mga2
+ Revision: 144223
-update to new upstream

* Mon Jul 04 2011 ahmad <ahmad> 1:1.6.0-1.mga2
+ Revision: 118035
- Update to 1.6.0

* Tue May 03 2011 ahmad <ahmad> 1:1.5.1-5.mga1
+ Revision: 94531
- Fix python-numeric obosletes
- Make the python-numeric Provides generic

* Fri Apr 29 2011 dmorgan <dmorgan> 1:1.5.1-4.mga1
+ Revision: 93481
- Obsoletes/Provides python-numeric

* Mon Jan 17 2011 pterjan <pterjan> 1:1.5.1-3.mga1
+ Revision: 20951
- Fix extensiosn linkage

  + misc <misc>
    - use a hack to make it compile until we can properly debug this
      ( ie, after the bootstrap phase )

  + ahmad <ahmad>
    - rebuild for python-2.7

* Thu Jan 13 2011 ahmad <ahmad> 1:1.5.1-2.mga1
+ Revision: 8284
- drop %%py_requires macro and use BR python-devel
- imported package python-numpy