%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} Name: python-ipaddr Version: 2.1.1 Release: 1%{?dist} Summary: A python library for working with IP addresses, both IPv4 and IPv6 Group: Development/Languages License: ASL 2.0 URL: http://code.google.com/p/ipaddr-py/ Source0: http://ipaddr-py.googlecode.com/files/ipaddr-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel %description python-ipaddr is a library for working with IP addresses, both IPv4 and IPv6. It was developed by Google for internal use, and is now open source. %prep %setup -q -n ipaddr-%{version} # remove unneeded shebang sed -i 1d ipaddr.py %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc COPYING README %{python_sitelib}/* %changelog * Thu May 06 2010 L.S. Keijser - 2.1.1-1 - initial release