Modernize spec
This commit is contained in:
parent
cf9b704139
commit
d24ef7a182
@ -1,12 +1,10 @@
|
||||
%if 0%{?fedora} > 12
|
||||
%if 0%{?fedora}
|
||||
%global with_python3 1
|
||||
%else
|
||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
|
||||
%endif
|
||||
|
||||
Name: python-cffi
|
||||
Version: 1.8.3
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Foreign Function Interface for Python to call C code
|
||||
License: MIT
|
||||
URL: http://cffi.readthedocs.org/
|
||||
@ -62,19 +60,12 @@ Documentation for CFFI, the Foreign Function Interface for Python.
|
||||
%prep
|
||||
%setup -q -n cffi-%{version}
|
||||
|
||||
%if 0%{?with_python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
%endif # with_python3
|
||||
|
||||
%build
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py build
|
||||
popd
|
||||
%py3_build
|
||||
%endif # with_python3
|
||||
|
||||
%{__python} setup.py build
|
||||
%py2_build
|
||||
cd doc
|
||||
make html
|
||||
rm build/html/.buildinfo
|
||||
@ -86,20 +77,16 @@ rm build/html/.buildinfo
|
||||
|
||||
%install
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py install \
|
||||
--skip-build --prefix=%{_prefix} --root %{buildroot} \
|
||||
%py3_install \
|
||||
--record %{buildroot}%{python3_sitearch}/cffi-%{version}-py%{python3_version}.egg-info/installed-files.txt
|
||||
popd
|
||||
%endif # with_python3
|
||||
%{__python} setup.py install \
|
||||
--skip-build --prefix=%{_prefix} --root %{buildroot} \
|
||||
%py2_install \
|
||||
--record %{buildroot}%{python2_sitearch}/cffi-%{version}-py%{python2_version}.egg-info/installed-files.txt
|
||||
|
||||
%files -n python2-cffi
|
||||
%doc PKG-INFO
|
||||
%license LICENSE
|
||||
%{python_sitearch}/*
|
||||
%{python2_sitearch}/*
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-cffi
|
||||
@ -112,6 +99,9 @@ popd
|
||||
%doc doc/build/html
|
||||
|
||||
%changelog
|
||||
* Fri Jan 6 2017 Orion Poplawski <orion@cora.nwra.com> - 1.8.3-4
|
||||
- Modernize spec
|
||||
|
||||
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.8.3-3
|
||||
- Rebuild for Python 3.6
|
||||
- Disable test dependencies
|
||||
|
Loading…
Reference in New Issue
Block a user