Blame SPECS/python-netifaces.spec

9ecc6e
%if 0%{?rhel} && 0%{?rhel} <= 6
9ecc6e
%{!?__python2:        %global __python2 /usr/bin/python2}
9ecc6e
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
9ecc6e
%endif
9ecc6e
9ecc6e
%if 0%{?fedora}
9ecc6e
%global with_python3 1
9ecc6e
%endif
9ecc6e
9ecc6e
%global pypi_name netifaces
9ecc6e
9ecc6e
Name:           python-netifaces
9ecc6e
Version:        0.10.4
9ecc6e
Release:        3%{?dist}
9ecc6e
Summary:        Python library to retrieve information about network interfaces 
9ecc6e
9ecc6e
Group:          Development/Libraries
9ecc6e
License:        MIT
9ecc6e
URL:            https://pypi.python.org/pypi/netifaces
9ecc6e
Source0:        https://pypi.python.org/packages/source/n/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
9ecc6e
9ecc6e
BuildRequires:  python2-devel
9ecc6e
BuildRequires:  python-setuptools
9ecc6e
9ecc6e
9ecc6e
%description
9ecc6e
This package provides a cross platform API for getting address information
9ecc6e
from network interfaces.
9ecc6e
9ecc6e
%if 0%{?with_python3}
9ecc6e
%package -n python3-%{pypi_name}
9ecc6e
Summary:        Python library to retrieve information about network interfaces
9ecc6e
BuildRequires:  python3-devel
9ecc6e
BuildRequires:  python3-setuptools
9ecc6e
9ecc6e
%description -n python3-%{pypi_name}
9ecc6e
This package provides a cross platform API for getting address information
9ecc6e
from network interfaces.
9ecc6e
%endif
9ecc6e
9ecc6e
9ecc6e
%prep
9ecc6e
%setup -q -n %{pypi_name}-%{version}
9ecc6e
9ecc6e
%if 0%{?with_python3}
9ecc6e
rm -rf %{py3dir}
9ecc6e
cp -a . %{py3dir}
9ecc6e
%endif
9ecc6e
9ecc6e
9ecc6e
%build
9ecc6e
%{__python2} setup.py build
9ecc6e
9ecc6e
%if 0%{?with_python3}
9ecc6e
pushd %{py3dir}
9ecc6e
%{__python3} setup.py build
9ecc6e
popd
9ecc6e
%endif
9ecc6e
9ecc6e
9ecc6e
%install
9ecc6e
%{__python2} setup.py install --root $RPM_BUILD_ROOT
9ecc6e
9ecc6e
%if 0%{?with_python3}
9ecc6e
pushd %{py3dir}
9ecc6e
%{__python3} setup.py install --root $RPM_BUILD_ROOT
9ecc6e
popd
9ecc6e
%endif
9ecc6e
9ecc6e
9ecc6e
%files
9ecc6e
%doc README.rst
9ecc6e
%{python2_sitearch}/%{pypi_name}-%{version}-*.egg-info/
9ecc6e
%{python2_sitearch}/%{pypi_name}.so
9ecc6e
9ecc6e
%if 0%{?with_python3}
9ecc6e
%files -n python3-%{pypi_name}
9ecc6e
%doc README.rst
9ecc6e
%{python3_sitearch}/%{pypi_name}-%{version}-*.egg-info/
9ecc6e
%{python3_sitearch}/%{pypi_name}*.so
9ecc6e
%endif
9ecc6e
9ecc6e
%changelog
9ecc6e
* Tue Oct 20 2015 Jon Schlueter <jschluet@redhat.com> 0.10.4-3
9ecc6e
- fix bad case on build section
9ecc6e
9ecc6e
* Tue Jun 16 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 0.10.4-2
9ecc6e
- Add python3 subpackage
9ecc6e
9ecc6e
* Mon Feb 23 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 0.10.4-1
9ecc6e
- Upstream 0.10.4
9ecc6e
- Packaging cleanups
9ecc6e
9ecc6e
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-8
9ecc6e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
9ecc6e
9ecc6e
* Mon Jun 30 2014 Toshio Kuratomi <toshio@fedoraproject.org> - 0.5-7
9ecc6e
- Replace python-setuptools-devel BR with python-setuptools
9ecc6e
9ecc6e
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-6
9ecc6e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
9ecc6e
9ecc6e
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-5
9ecc6e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
9ecc6e
9ecc6e
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-4
9ecc6e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
9ecc6e
9ecc6e
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-3
9ecc6e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
9ecc6e
9ecc6e
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-2
9ecc6e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
9ecc6e
9ecc6e
* Wed Jun 1 2011 Ryan Rix <ry@n.rix.si> 0.5-1
9ecc6e
- Initial packaging effort