summaryrefslogtreecommitdiffstats
path: root/python-netaddr.spec
blob: 20368c63c37209db14fe1ba93167ecc2a70f5927 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:           python-netaddr
Version:        0.4
Release:        1%{?dist}
Summary:        Network address manipulation, done Pythonically

Group:          Development/Libraries
License:        BSD
URL:            http://code.google.com/p/netaddr/
Source0:        http://netaddr.googlecode.com/files/netaddr-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  python-devel, python-setuptools

%description
netaddr is a network address manipulation library written in pure Python.

It supports the Pythonic manipulation of several common network address
notations and standards, including :-

- IP version 4
- IP version 6
- CIDR (Classless Inter-Domain Routing)
- IEEE EUI-48 and EUI-64
- MAC (Media Access Control)

%prep
%setup -q -n netaddr-%{version}
chmod 644 tests/*


%build
%{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
chmod 755 $RPM_BUILD_ROOT%{python_sitelib}/netaddr/__init__.py
chmod 755 $RPM_BUILD_ROOT%{python_sitelib}/netaddr/strategy.py
chmod 755 $RPM_BUILD_ROOT%{python_sitelib}/netaddr/address.py


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc GLOSSARY INSTALL LICENSE PKG-INFO README docs/api/ tests
%{python_sitelib}/*


%changelog
* Mon Aug 11 2008 John Eckersberg <jeckersb@redhat.com> - 0.4-1
- Initial packaging for Fedora