123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- %{!?__python3:%global __python3 /usr/bin/python3}
- %{!?python3_inc:%global python3_inc %(%{__python3} -c "from distutils.sysconfig import get_python_inc; print(get_python_inc(1))")}
- %{!?python3_sitearch: %global python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")}
- %{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
- %{!?python3_version: %global python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
- %{!?__python2: %global __python2 /usr/bin/python2}
- %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
- %define py2_setup setup.py
- %define py2_shbang_opts -s
- %define py2_build() %{expand:\
- CFLAGS="%{optflags}" %{__python2} %{py2_setup} %{?py2_setup_args} build --executable="%{__python2} %{py2_shbang_opts}" %{?1}\
- }
- %define py2_install() %{expand:\
- CFLAGS="%{optflags}" %{__python2} %{py2_setup} %{?py2_setup_args} install -O1 --skip-build --root %{buildroot} %{?1}\
- }
- %define py3_setup setup.py
- %define py3_shbang_opts -s
- %define py3_build() %{expand:\
- CFLAGS="%{optflags}" %{__python3} %{py3_setup} %{?py3_setup_args} build --executable="%{__python3} %{py3_shbang_opts}" %{?1}\
- }
- %define py3_install() %{expand:\
- CFLAGS="%{optflags}" %{__python3} %{py3_setup} %{?py3_setup_args} install -O1 --skip-build --root %{buildroot} %{?1}\
- }
- %define py3dir %{_builddir}/python3-%{name}-%{version}-%{release}
- %global with_python3 1
- %global pypi_name netifaces
- Name: python-netifaces
- Version: 0.10.4
- Release: 5%{?_dist_release}
- Summary: Python library to retrieve information about network interfaces
- Group: Development/Libraries
- License: MIT
- URL: https:
- Vendor: Project Vine
- Distribution: Vine Linux
- Source0: https:
- BuildRequires: python-devel
- BuildRequires: python-setuptools
- %description
- This package provides a cross platform API for getting address information
- 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
- %setup -q -n %{pypi_name}-%{version}
- %if 0%{?with_python3}
- rm -rf %{py3dir}
- cp -a . %{py3dir}
- %endif
- %build
- %{__python2} setup.py build
- %if 0%{?with_python3}
- pushd %{py3dir}
- %{__python3} setup.py build
- popd
- %endif
- %install
- %{__python2} setup.py install --root $RPM_BUILD_ROOT
- %if 0%{?with_python3}
- pushd %{py3dir}
- %{__python3} setup.py install --root $RPM_BUILD_ROOT
- popd
- %endif
- %clean
- %if 0%{?with_python3}
- rm -rf %{py3dir}
- %endif
- rm -rf %{buildroot}
- %files
- %doc README.rst
- %{python2_sitearch}/%{pypi_name}-%{version}-*.egg-info/
- %{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
- * Tue Jul 12 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.10.4-5
- - initial build for Vine Linux.
- * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.4-4
- - Rebuilt for https:
- * Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.4-3
- - Rebuilt for https:
- * 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
- - Upstream 0.10.4
- - Packaging cleanups
- * Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-8
- - Rebuilt for https:
- * Mon Jun 30 2014 Toshio Kuratomi <toshio@fedoraproject.org> - 0.5-7
- - Replace python-setuptools-devel BR with python-setuptools
- * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-6
- - Rebuilt for https:
- * Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-5
- - Rebuilt for https:
- * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-4
- - Rebuilt for https:
- * Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-3
- - Rebuilt for https:
- * Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-2
- - Rebuilt for https:
- * Wed Jun 1 2011 Ryan Rix <ry@n.rix.si> 0.5-1
- - Initial packaging effort
|