python-netifaces/python-netifaces.spec

58 lines
1.5 KiB
RPMSpec
Raw Normal View History

2011-06-17 18:57:41 +00:00
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from %distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from %distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
# Filter private shared library provides
%filter_provides_in %{python_sitearch}/zope/interface/.*\.so$
%filter_setup
2011-06-17 19:28:33 +00:00
Name: python-netifaces
Version: 0.5
Release: 1%{?dist}
Summary: Python library to retrieve information about network interfaces
Group: Development/Libraries
License: MIT
URL: http://alastairs-place.net/netifaces/
2011-06-17 18:57:41 +00:00
Source0: http://alastairs-place.net/2007/03/netifaces/netifaces-0.5.tar.gz
2011-06-17 19:28:33 +00:00
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
2011-06-17 18:57:41 +00:00
2011-06-17 19:28:33 +00:00
BuildRequires: python2-devel
BuildRequires: python-setuptools-devel
Requires: python2
2011-06-17 18:57:41 +00:00
%description
This package provides a cross platform API for getting address information
from network interfaces.
%prep
%setup -q -n netifaces-%{version}
%build
python setup.py build
%install
rm -rf $RPM_BUILD_ROOT
python setup.py install --root $RPM_BUILD_ROOT
chmod -x $RPM_BUILD_ROOT/usr/lib64/python2.7/site-packages/netifaces-0.5-py2.7.egg-info/*
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc README
%{python_sitearch}/netifaces-0.5-py2.7.egg-info/
%{python_sitearch}/netifaces.so
%changelog
* Wed Jun 1 2011 Ryan Rix <ry@n.rix.si> 0.5-1
- Initial packaging effort