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 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/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
%define modname numpy
Name: python-numpy Name: python-%{modname}
Version: 1.6.1 Version: 1.6.1
Release: 0 Release: 0
Url: http://sourceforge.net/projects/numpy Url: http://sourceforge.net/projects/numpy
Summary: NumPy array processing for numbers, strings, records and objects Summary: NumPy array processing for numbers, strings, records and objects
License: BSD-3-Clause License: BSD-3-Clause
Group: Development/Libraries/Python Group: Development/Libraries/Python
Source: numpy-%{version}.tar.gz Source: %{modname}-%{version}.tar.gz
Patch1: numpy-buildfix.patch Patch1: numpy-buildfix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build 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: blas-devel
BuildRequires: lapack-devel BuildRequires: lapack-devel
%else %else
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
BuildRequires: blas BuildRequires: blas
BuildRequires: lapack BuildRequires: lapack
%endif %endif
BuildRequires: python-devel
%if 0%{?suse_version} %if 0%{?suse_version}
BuildRequires: gcc-fortran BuildRequires: gcc-fortran
%py_requires
%if 0%{?suse_version} > 1020
BuildRequires: fdupes BuildRequires: fdupes
%endif %py_requires
%else %else
BuildRequires: gcc-gfortran BuildRequires: gcc-gfortran
%endif %endif
Provides: numpy = %{version}
%if ! 0%{?fedora_version} %if ! 0%{?fedora_version}
Provides: python-numeric = %{version} Provides: python-numeric = %{version}
Obsoletes: python-numeric < %{version} Obsoletes: python-numeric < %{version}
%endif %endif
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%description %description
NumPy is a general-purpose array-processing package designed to 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. basic linear algebra and random number generation.
%package devel %package devel
Summary: Development files for numpy applications Summary: Development files for %{modname} applications
Group: Development/Libraries/Python Group: Development/Libraries/Python
Requires: %{name} = %{version} Requires: %{name} = %{version}
%if 0%{?suse_version} > 1130 Requires: python-devel
%if 0%{?suse_version} > 1110
Requires: blas-devel Requires: blas-devel
Requires: lapack-devel Requires: lapack-devel
%else %else
Requires: blas Requires: blas
Requires: lapack Requires: lapack
%endif %endif
Requires: python-devel
%if 0%{?suse_version} %if 0%{?suse_version}
Requires: gcc-fortran Requires: gcc-fortran
%py_requires -d
%else %else
Requires: gcc-gfortran Requires: gcc-gfortran
%endif %endif
%description devel %description devel
This package contains files for developing applications using numpy. This package contains files for developing applications using %{modname}.
%prep %prep
%setup -q -n numpy-%{version} %setup -q -n %{modname}-%{version}
%patch1 -p0 %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 %build
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
%install %install
python setup.py install --root="%{buildroot}" --prefix="%{_prefix}" 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 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} > 1020 %if 0%{?suse_version}
%fdupes -s %{buildroot}%{_prefix} %fdupes -s %{buildroot}%{_prefix}
%endif %endif
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc *.txt %doc *.txt
%{_bindir}/* %{_bindir}/f2py
%{python_sitearch}/* %{python_sitearch}/%{modname}/
%exclude %{python_sitearch}/numpy/*/*/*.c %{python_sitearch}/%{modname}-%{version}-py%{py_ver}.egg-info
%exclude %{python_sitearch}/numpy/*/*.h %exclude %{python_sitearch}/%{modname}/*/*/*.c
%exclude %{python_sitearch}/numpy/*/*/*.h %exclude %{python_sitearch}/%{modname}/*/*.h
%exclude %{python_sitearch}/numpy/*/*/*/*.h %exclude %{python_sitearch}/%{modname}/*/*/*.h
%exclude %{python_sitearch}/numpy/core/lib/libnpymath.a %exclude %{python_sitearch}/%{modname}/*/*/*/*.h
%exclude %{python_sitearch}/%{modname}/core/lib/libnpymath.a
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%{python_sitearch}/numpy/*/*/*.c %{python_sitearch}/%{modname}/*/*/*.c
%{python_sitearch}/numpy/*/*.h %{python_sitearch}/%{modname}/*/*.h
%{python_sitearch}/numpy/*/*/*.h %{python_sitearch}/%{modname}/*/*/*.h
%{python_sitearch}/numpy/*/*/*/*.h %{python_sitearch}/%{modname}/*/*/*/*.h
%{python_sitearch}/numpy/core/lib/libnpymath.a %{python_sitearch}/%{modname}/core/lib/libnpymath.a
%changelog %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 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/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: python3-numpy %define modname numpy
Name: python3-%{modname}
Version: 1.6.1 Version: 1.6.1
Release: 0 Release: 0
Url: http://sourceforge.net/projects/numpy Url: http://sourceforge.net/projects/numpy
Summary: NumPy array processing for numbers, strings, records and objects Summary: NumPy array processing for numbers, strings, records and objects
License: BSD-3-Clause License: BSD-3-Clause
Group: Development/Libraries/Python Group: Development/Libraries/Python
Source: numpy-%{version}.tar.gz Source: %{modname}-%{version}.tar.gz
Patch1: numpy-buildfix.patch Patch1: numpy-buildfix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python3 BuildRequires: python3
@ -32,6 +33,7 @@ BuildRequires: blas-devel
BuildRequires: lapack-devel BuildRequires: lapack-devel
%if 0%{?suse_version} <= 1140 %if 0%{?suse_version} <= 1140
%{!?python3_sitearch: %global python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %{!?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 %endif
%if 0%{?suse_version} %if 0%{?suse_version}
BuildRequires: gcc-fortran BuildRequires: gcc-fortran
@ -54,9 +56,12 @@ There are also basic facilities for discrete fourier transform,
basic linear algebra and random number generation. basic linear algebra and random number generation.
%package devel %package devel
Summary: Development files for numpy applications Summary: Development files for %{modname} applications
Group: Development/Libraries/Python Group: Development/Libraries/Python
Requires: %{name} = %{version} Requires: %{name} = %{version}
Requires: python3 >= %{py3_ver}
Requires: python3-devel >= %{py3_ver}
Requires: python(abi) >= %{py3_ver}
%if 0%{?suse_version} > 1130 %if 0%{?suse_version} > 1130
Requires: blas-devel Requires: blas-devel
Requires: lapack-devel Requires: lapack-devel
@ -64,29 +69,26 @@ Requires: lapack-devel
Requires: blas Requires: blas
Requires: lapack Requires: lapack
%endif %endif
Requires: python3 >= %{py3_ver}
Requires: python3-devel >= %{py3_ver}
%if 0%{?suse_version} %if 0%{?suse_version}
Requires: gcc-fortran Requires: gcc-fortran
%else %else
Requires: gcc-gfortran Requires: gcc-gfortran
%endif %endif
%description devel %description devel
This package contains files for developing applications using numpy. This package contains files for developing applications using %{modname}.
%prep %prep
%setup -q -n numpy-%{version} %setup -q -n %{modname}-%{version}
%patch1 -p0 %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 %build
CFLAGS="%{optflags} -fno-strict-aliasing" python3 setup.py build CFLAGS="%{optflags} -fno-strict-aliasing" python3 setup.py build
%install %install
python3 setup.py install --root="%{buildroot}" --prefix="%{_prefix}" 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 rm -rf %{buildroot}%{python3_sitearch}/%{modname}/{,core,distutils,f2py,fft,ma,matrixlib,oldnumeric,polynomial,random,testing}/tests # Don't package testsuite
mv %{buildroot}%{_bindir}/f2py3 %{buildroot}%{_bindir}/f2py3-python3
%if 0%{?suse_version} %if 0%{?suse_version}
%fdupes -s %{buildroot}%{_prefix} %fdupes -s %{buildroot}%{_prefix}
%endif %endif
@ -94,20 +96,21 @@ mv %{buildroot}%{_bindir}/f2py3 %{buildroot}%{_bindir}/f2py3-python3
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc *.txt %doc *.txt
%{_bindir}/f2py3-python3 %{_bindir}/f2py3
%{python3_sitearch}/* %{python3_sitearch}/%{modname}/
%exclude %{python3_sitearch}/numpy/*/*/*.c %{python3_sitearch}/%{modname}-%{version}-py%{py3_ver}.egg-info
%exclude %{python3_sitearch}/numpy/*/*.h %exclude %{python3_sitearch}/%{modname}/*/*/*.c
%exclude %{python3_sitearch}/numpy/*/*/*.h %exclude %{python3_sitearch}/%{modname}/*/*.h
%exclude %{python3_sitearch}/numpy/*/*/*/*.h %exclude %{python3_sitearch}/%{modname}/*/*/*.h
%exclude %{python3_sitearch}/numpy/core/lib/libnpymath.a %exclude %{python3_sitearch}/%{modname}/*/*/*/*.h
%exclude %{python3_sitearch}/%{modname}/core/lib/libnpymath.a
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%{python3_sitearch}/numpy/*/*/*.c %{python3_sitearch}/%{modname}/*/*/*.c
%{python3_sitearch}/numpy/*/*.h %{python3_sitearch}/%{modname}/*/*.h
%{python3_sitearch}/numpy/*/*/*.h %{python3_sitearch}/%{modname}/*/*/*.h
%{python3_sitearch}/numpy/*/*/*/*.h %{python3_sitearch}/%{modname}/*/*/*/*.h
%{python3_sitearch}/numpy/core/lib/libnpymath.a %{python3_sitearch}/%{modname}/core/lib/libnpymath.a
%changelog %changelog