Add python3 subpackage
This commit is contained in:
parent
89d2dddfe8
commit
83a9930eec
@ -3,12 +3,16 @@
|
|||||||
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?fedora}
|
||||||
|
%global with_python3 1
|
||||||
|
%endif
|
||||||
|
|
||||||
%global pypi_name netifaces
|
%global pypi_name netifaces
|
||||||
|
|
||||||
Name: python-netifaces
|
Name: python-netifaces
|
||||||
Version: 0.10.4
|
Version: 0.10.4
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Python library to retrieve information about network interfaces
|
Summary: Python library to retrieve information about network interfaces
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -23,25 +27,63 @@ BuildRequires: python-setuptools
|
|||||||
This package provides a cross platform API for getting address information
|
This package provides a cross platform API for getting address information
|
||||||
from network interfaces.
|
from network interfaces.
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
%package -n python3-%{pypi_name}
|
||||||
|
Summary: Python library to retrieve information about network interfaces
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
|
||||||
|
%description -n python3-%{pypi_name}
|
||||||
|
This package provides a cross platform API for getting address information
|
||||||
|
from network interfaces.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{pypi_name}-%{version}
|
%setup -q -n %{pypi_name}-%{version}
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
rm -rf %{py3dir}
|
||||||
|
cp -a . %{py3dir}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%Build
|
%Build
|
||||||
%{__python2} setup.py build
|
%{__python2} setup.py build
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
pushd %{py3dir}
|
||||||
|
%{__python3} setup.py build
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__python2} setup.py install --root $RPM_BUILD_ROOT
|
%{__python2} setup.py install --root $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
pushd %{py3dir}
|
||||||
|
%{__python3} setup.py install --root $RPM_BUILD_ROOT
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%{python2_sitearch}/%{pypi_name}-%{version}-*.egg-info/
|
%{python2_sitearch}/%{pypi_name}-%{version}-*.egg-info/
|
||||||
%{python2_sitearch}/%{pypi_name}.so
|
%{python2_sitearch}/%{pypi_name}.so
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
%files -n python3-%{pypi_name}
|
||||||
|
%doc README.rst
|
||||||
|
%{python3_sitearch}/%{pypi_name}-%{version}-*.egg-info/
|
||||||
|
%{python3_sitearch}/%{pypi_name}*.so
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 16 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 0.10.4-2
|
||||||
|
- Add python3 subpackage
|
||||||
|
|
||||||
* Mon Feb 23 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 0.10.4-1
|
* Mon Feb 23 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 0.10.4-1
|
||||||
- Upstream 0.10.4
|
- Upstream 0.10.4
|
||||||
- Packaging cleanups
|
- Packaging cleanups
|
||||||
|
Loading…
Reference in New Issue
Block a user