2011-07-18 19:46:56 +02:00
|
|
|
# norootforbuild
|
|
|
|
|
|
|
|
Name: python-ipaddr
|
|
|
|
Version: 2.1.9
|
|
|
|
Release: 1
|
|
|
|
Summary: Python IP address manipulation library
|
|
|
|
Group: Development/Libraries/Python
|
2011-07-19 11:33:47 +02:00
|
|
|
License: Apache License, Version 2.0
|
2011-07-18 19:46:56 +02:00
|
|
|
URL: http://code.google.com/p/ipaddr-py/
|
|
|
|
Source0: http://ipaddr-py.googlecode.com/files/ipaddr-%{version}.tar.gz
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-build
|
2011-07-19 11:25:27 +02:00
|
|
|
BuildRequires: python-setuptools
|
2011-07-19 10:50:45 +02:00
|
|
|
%if 0%{?suse_version} > 1010
|
2011-07-18 19:46:56 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
%endif
|
2011-07-19 11:25:27 +02:00
|
|
|
%if 0%{?suse_version} > 0 && 0%{?suse_version} < 1130
|
2011-07-18 19:46:56 +02:00
|
|
|
# py_requires is no longer needed since 11.3
|
2011-07-19 11:33:47 +02:00
|
|
|
%py_requires -d
|
2011-07-19 11:10:50 +02:00
|
|
|
%else
|
|
|
|
%if 0%{?suse_version}
|
2011-07-19 11:25:27 +02:00
|
|
|
Requires: python-base = %{py_ver}
|
2011-07-19 11:10:50 +02:00
|
|
|
%else
|
2011-07-19 11:33:47 +02:00
|
|
|
BuildRequires:
|
2011-07-19 11:10:50 +02:00
|
|
|
Requires: python
|
2011-07-18 19:46:56 +02:00
|
|
|
%endif
|
2011-07-19 10:54:06 +02:00
|
|
|
%endif
|
2011-07-18 19:46:56 +02:00
|
|
|
Autoreqprov: on
|
|
|
|
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
|
|
|
|
BuildArchitectures: noarch
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
An IPv4/IPv6 manipulation library in Python. This library is used to create/poke/manipulate IPv4 and IPv6 addresses and prefixes.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n ipaddr-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
%{__python} setup.py build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot} --compile --optimize=2 --record-rpm=INSTALLED_FILES
|
|
|
|
%else
|
|
|
|
%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot} --compile --optimize=2 --record=INSTALLED_FILES
|
|
|
|
%endif
|
2011-07-19 10:50:45 +02:00
|
|
|
%if 0%{?suse_version} > 1010
|
2011-07-18 19:46:56 +02:00
|
|
|
%fdupes %{buildroot}%{py_sitedir}
|
|
|
|
%endif
|
|
|
|
%if 0%{?mdkversion} >= 201001
|
|
|
|
# Mandriva 2010.1 has some issues with byte compiling
|
|
|
|
# It refuses to, but it still outputs the .py[co] to the INSTALLED_FILES list
|
|
|
|
grep -v '[.]py[co]$' INSTALLED_FILES > INSTALLED_FILES_MDK
|
|
|
|
mv -f INSTALLED_FILES_MDK INSTALLED_FILES
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
|
|
%files -f INSTALLED_FILES
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc README
|
|
|
|
|
|
|
|
%changelog
|