Accepting request 121373 from devel:languages:python

Fix rpmlint warnings (forwarded request 121372 from TheBlackCat)

OBS-URL: https://build.opensuse.org/request/show/121373
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-numpy?expand=0&rev=19
This commit is contained in:
Stephan Kulow 2012-05-21 06:07:34 +00:00 committed by Git OBS Bridge
parent ff23b9631f
commit 2a4bdd9050
4 changed files with 73 additions and 54 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Fri May 18 08:46:22 UTC 2012 - toddrme2178@gmail.com
- Fix rpmlint warnings
-------------------------------------------------------------------
Mon Apr 30 15:17:34 UTC 2012 - toddrme2178@gmail.com
- Removed tests for unsupported openSUSE versions
-------------------------------------------------------------------
Mon Apr 23 16:25:57 UTC 2012 - toddrme2178@gmail.com

View File

@ -15,40 +15,39 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: python-numpy
%define modname numpy
Name: python-%{modname}
Version: 1.6.1
Release: 0
Url: http://sourceforge.net/projects/numpy
Summary: NumPy array processing for numbers, strings, records and objects
License: BSD-3-Clause
Group: Development/Libraries/Python
Source: numpy-%{version}.tar.gz
Source: %{modname}-%{version}.tar.gz
Patch1: numpy-buildfix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1130
BuildRequires: python-devel
Requires: python(abi) >= %{py_ver}
Provides: numpy = %{version}
%if 0%{?suse_version} > 1110
BuildRequires: blas-devel
BuildRequires: lapack-devel
%else
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
BuildRequires: blas
BuildRequires: lapack
%endif
BuildRequires: python-devel
%if 0%{?suse_version}
BuildRequires: gcc-fortran
%py_requires
%if 0%{?suse_version} > 1020
BuildRequires: fdupes
%endif
%py_requires
%else
BuildRequires: gcc-gfortran
%endif
Provides: numpy = %{version}
%if ! 0%{?fedora_version}
Provides: python-numeric = %{version}
Obsoletes: python-numeric < %{version}
%endif
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%description
NumPy is a general-purpose array-processing package designed to
@ -63,58 +62,60 @@ There are also basic facilities for discrete fourier transform,
basic linear algebra and random number generation.
%package devel
Summary: Development files for numpy applications
Summary: Development files for %{modname} applications
Group: Development/Libraries/Python
Requires: %{name} = %{version}
%if 0%{?suse_version} > 1130
Requires: python-devel
%if 0%{?suse_version} > 1110
Requires: blas-devel
Requires: lapack-devel
%else
Requires: blas
Requires: lapack
%endif
Requires: python-devel
%if 0%{?suse_version}
Requires: gcc-fortran
%py_requires -d
%else
Requires: gcc-gfortran
Requires: gcc-gfortran
%endif
%description devel
This package contains files for developing applications using numpy.
This package contains files for developing applications using %{modname}.
%prep
%setup -q -n numpy-%{version}
%setup -q -n %{modname}-%{version}
%patch1 -p0
sed -i "1d" numpy/{compat/setup{,scons},distutils/{conv_template,cpuinfo,exec_command,from_template,setup,setupscons,system_info},f2py/{auxfuncs,capi_maps,cb_rules,cfuncs,common_rules,crackfortran,diagnose,docs/usersguide/setup_example,f2py2e,f90mod_rules,func2subr,__init__,rules,setup,setupscons,use_rules},ma/setup{,scons},matrixlib/setup{,scons},setup,setupscons,testing/print_coercion_tables,testing/setup{,scons}}.py # Fix non-executable scripts
sed -i "1d" %{modname}/{compat/setup{,scons},distutils/{conv_template,cpuinfo,exec_command,from_template,setup,setupscons,system_info},f2py/{auxfuncs,capi_maps,cb_rules,cfuncs,common_rules,crackfortran,diagnose,docs/usersguide/setup_example,f2py2e,f90mod_rules,func2subr,__init__,rules,setup,setupscons,use_rules},ma/setup{,scons},matrixlib/setup{,scons},setup,setupscons,testing/print_coercion_tables,testing/setup{,scons}}.py # Fix non-executable scripts
%build
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
%install
python setup.py install --root="%{buildroot}" --prefix="%{_prefix}"
rm -rf %{buildroot}%{python_sitearch}/numpy/{,core,distutils,f2py,fft,ma,matrixlib,oldnumeric,polynomial,random,testing}/tests # Don't package testsuite
%if 0%{?suse_version} > 1020
rm -rf %{buildroot}%{python_sitearch}/%{modname}/{,core,distutils,f2py,fft,ma,matrixlib,oldnumeric,polynomial,random,testing}/tests # Don't package testsuite
%if 0%{?suse_version}
%fdupes -s %{buildroot}%{_prefix}
%endif
%files
%defattr(-,root,root)
%doc *.txt
%{_bindir}/*
%{python_sitearch}/*
%exclude %{python_sitearch}/numpy/*/*/*.c
%exclude %{python_sitearch}/numpy/*/*.h
%exclude %{python_sitearch}/numpy/*/*/*.h
%exclude %{python_sitearch}/numpy/*/*/*/*.h
%exclude %{python_sitearch}/numpy/core/lib/libnpymath.a
%{_bindir}/f2py
%{python_sitearch}/%{modname}/
%{python_sitearch}/%{modname}-%{version}-py%{py_ver}.egg-info
%exclude %{python_sitearch}/%{modname}/*/*/*.c
%exclude %{python_sitearch}/%{modname}/*/*.h
%exclude %{python_sitearch}/%{modname}/*/*/*.h
%exclude %{python_sitearch}/%{modname}/*/*/*/*.h
%exclude %{python_sitearch}/%{modname}/core/lib/libnpymath.a
%files devel
%defattr(-,root,root)
%{python_sitearch}/numpy/*/*/*.c
%{python_sitearch}/numpy/*/*.h
%{python_sitearch}/numpy/*/*/*.h
%{python_sitearch}/numpy/*/*/*/*.h
%{python_sitearch}/numpy/core/lib/libnpymath.a
%{python_sitearch}/%{modname}/*/*/*.c
%{python_sitearch}/%{modname}/*/*.h
%{python_sitearch}/%{modname}/*/*/*.h
%{python_sitearch}/%{modname}/*/*/*/*.h
%{python_sitearch}/%{modname}/core/lib/libnpymath.a
%changelog

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri May 18 08:46:22 UTC 2012 - toddrme2178@gmail.com
- Fix rpmlint warnings
-------------------------------------------------------------------
Mon Apr 30 15:17:34 UTC 2012 - toddrme2178@gmail.com

View File

@ -15,14 +15,15 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: python3-numpy
%define modname numpy
Name: python3-%{modname}
Version: 1.6.1
Release: 0
Url: http://sourceforge.net/projects/numpy
Summary: NumPy array processing for numbers, strings, records and objects
License: BSD-3-Clause
Group: Development/Libraries/Python
Source: numpy-%{version}.tar.gz
Source: %{modname}-%{version}.tar.gz
Patch1: numpy-buildfix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python3
@ -32,6 +33,7 @@ BuildRequires: blas-devel
BuildRequires: lapack-devel
%if 0%{?suse_version} <= 1140
%{!?python3_sitearch: %global python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%{!?py3_ver: %global py3_ver %(python3 -c "import sys; version=str(sys.version_info[0]) + '.' + str(sys.version_info[1]); print(version)" 2>/dev/null || echo PYTHON-NOT-FOUND)}
%endif
%if 0%{?suse_version}
BuildRequires: gcc-fortran
@ -54,9 +56,12 @@ There are also basic facilities for discrete fourier transform,
basic linear algebra and random number generation.
%package devel
Summary: Development files for numpy applications
Summary: Development files for %{modname} applications
Group: Development/Libraries/Python
Requires: %{name} = %{version}
Requires: python3 >= %{py3_ver}
Requires: python3-devel >= %{py3_ver}
Requires: python(abi) >= %{py3_ver}
%if 0%{?suse_version} > 1130
Requires: blas-devel
Requires: lapack-devel
@ -64,29 +69,26 @@ Requires: lapack-devel
Requires: blas
Requires: lapack
%endif
Requires: python3 >= %{py3_ver}
Requires: python3-devel >= %{py3_ver}
%if 0%{?suse_version}
Requires: gcc-fortran
%else
Requires: gcc-gfortran
Requires: gcc-gfortran
%endif
%description devel
This package contains files for developing applications using numpy.
This package contains files for developing applications using %{modname}.
%prep
%setup -q -n numpy-%{version}
%setup -q -n %{modname}-%{version}
%patch1 -p0
sed -i "1d" numpy/{compat/setup{,scons},distutils/{conv_template,cpuinfo,exec_command,from_template,setup,setupscons,system_info},f2py/{auxfuncs,capi_maps,cb_rules,cfuncs,common_rules,crackfortran,diagnose,docs/usersguide/setup_example,f2py2e,f90mod_rules,func2subr,__init__,rules,setup,setupscons,use_rules},ma/setup{,scons},matrixlib/setup{,scons},setup,setupscons,testing/print_coercion_tables,testing/setup{,scons}}.py # Fix non-executable scripts
sed -i "1d" %{modname}/{compat/setup{,scons},distutils/{conv_template,cpuinfo,exec_command,from_template,setup,setupscons,system_info},f2py/{auxfuncs,capi_maps,cb_rules,cfuncs,common_rules,crackfortran,diagnose,docs/usersguide/setup_example,f2py2e,f90mod_rules,func2subr,__init__,rules,setup,setupscons,use_rules},ma/setup{,scons},matrixlib/setup{,scons},setup,setupscons,testing/print_coercion_tables,testing/setup{,scons}}.py # Fix non-executable scripts
%build
CFLAGS="%{optflags} -fno-strict-aliasing" python3 setup.py build
%install
python3 setup.py install --root="%{buildroot}" --prefix="%{_prefix}"
rm -rf %{buildroot}%{python3_sitearch}/numpy/{,core,distutils,f2py,fft,ma,matrixlib,oldnumeric,polynomial,random,testing}/tests # Don't package testsuite
mv %{buildroot}%{_bindir}/f2py3 %{buildroot}%{_bindir}/f2py3-python3
rm -rf %{buildroot}%{python3_sitearch}/%{modname}/{,core,distutils,f2py,fft,ma,matrixlib,oldnumeric,polynomial,random,testing}/tests # Don't package testsuite
%if 0%{?suse_version}
%fdupes -s %{buildroot}%{_prefix}
%endif
@ -94,20 +96,21 @@ mv %{buildroot}%{_bindir}/f2py3 %{buildroot}%{_bindir}/f2py3-python3
%files
%defattr(-,root,root)
%doc *.txt
%{_bindir}/f2py3-python3
%{python3_sitearch}/*
%exclude %{python3_sitearch}/numpy/*/*/*.c
%exclude %{python3_sitearch}/numpy/*/*.h
%exclude %{python3_sitearch}/numpy/*/*/*.h
%exclude %{python3_sitearch}/numpy/*/*/*/*.h
%exclude %{python3_sitearch}/numpy/core/lib/libnpymath.a
%{_bindir}/f2py3
%{python3_sitearch}/%{modname}/
%{python3_sitearch}/%{modname}-%{version}-py%{py3_ver}.egg-info
%exclude %{python3_sitearch}/%{modname}/*/*/*.c
%exclude %{python3_sitearch}/%{modname}/*/*.h
%exclude %{python3_sitearch}/%{modname}/*/*/*.h
%exclude %{python3_sitearch}/%{modname}/*/*/*/*.h
%exclude %{python3_sitearch}/%{modname}/core/lib/libnpymath.a
%files devel
%defattr(-,root,root)
%{python3_sitearch}/numpy/*/*/*.c
%{python3_sitearch}/numpy/*/*.h
%{python3_sitearch}/numpy/*/*/*.h
%{python3_sitearch}/numpy/*/*/*/*.h
%{python3_sitearch}/numpy/core/lib/libnpymath.a
%{python3_sitearch}/%{modname}/*/*/*.c
%{python3_sitearch}/%{modname}/*/*.h
%{python3_sitearch}/%{modname}/*/*/*.h
%{python3_sitearch}/%{modname}/*/*/*/*.h
%{python3_sitearch}/%{modname}/core/lib/libnpymath.a
%changelog