[python-iptools] Initial import

Orion Poplawski orion at fedoraproject.org
Tue Apr 23 14:58:12 UTC 2013


commit 3fcc9516f61cad7a237e71f020780b3b86fbfb52
Author: Orion Poplawski <orion at nwra.com>
Date:   Tue Apr 23 08:58:10 2013 -0600

    Initial import

 .gitignore          |    1 +
 python-iptools.spec |  108 +++++++++++++++++++++++++++++++++++++++++++++++++++
 sources             |    1 +
 3 files changed, 110 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..3e63a18 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/v0.6.1.tar.gz
diff --git a/python-iptools.spec b/python-iptools.spec
new file mode 100644
index 0000000..2813306
--- /dev/null
+++ b/python-iptools.spec
@@ -0,0 +1,108 @@
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%global with_python3 1
+
+Name:           python-iptools
+Version:        0.6.1
+Release:        1%{?dist}
+Summary:        A few useful functions and objects for manipulating IP addresses in python
+
+License:        BSD
+URL:            https://github.com/bd808/%{name}
+Source0:        https://github.com/bd808/%{name}/archive/v%{version}.tar.gz
+
+BuildArch:      noarch
+BuildRequires:  python2-devel
+BuildRequires:  python-setuptools
+%if 0%{?with_python3}
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+%endif # if with_python3
+
+%description
+A few useful functions and objects for manipulating IPv4 and IPv6 addresses
+in python. The project was inspired by a desire to be able to use CIDR address
+notation to designate INTERNAL_IPS in a Django project's settings file.
+
+
+%if 0%{?with_python3}
+%package -n python3-iptools
+Summary:        A few useful functions and objects for manipulating IP addresses in python 3
+Group:          Applications/System
+
+%description -n python3-iptools
+A few useful functions and objects for manipulating IPv4 and IPv6 addresses
+in python. The project was inspired by a desire to be able to use CIDR address
+notation to designate INTERNAL_IPS in a Django project's settings file.
+%endif # if with_python3
+
+
+%prep
+%setup -q
+find -name .gitignore -delete
+
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif # with_python3
+
+
+%build
+%{__python} setup.py build
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
+
+
+%install
+# Must do the python3 install first because the scripts in /usr/bin are
+# overwritten with every setup.py install (and we want the python2 version
+# to be the default for now).
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif # with_python3
+
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+
+
+%check
+%{__python} setup.py test
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py test
+popd
+%endif # with_python3
+
+ 
+%files
+%doc AUTHORS CHANGES docs LICENSE README.md
+%{python_sitelib}/*
+
+%if 0%{?with_python3}
+%files -n python3-iptools
+%doc AUTHORS CHANGES docs LICENSE README.md
+%{python3_sitelib}/*
+%endif # with_python3
+
+
+%changelog
+* Mon Apr 22 2013 Orion Poplawski <orion at cora.nwra.com> - 0.6.1-1
+- Update to 0.6.1
+
+* Fri Apr 19 2013 Orion Poplawski <orion at cora.nwra.com> - 0.6.0-4
+- Remove install dir rm in %%install
+
+* Fri Apr 19 2013 Orion Poplawski <orion at cora.nwra.com> - 0.6.0-3
+- Cleanup macros
+
+* Sun Apr 7 2013 Orion Poplawski <orion at cora.nwra.com> - 0.6.0-2
+- Add BR python-setuptools
+- Add %%check
+
+* Sat Apr 6 2013 Orion Poplawski <orion at cora.nwra.com> - 0.6.0-1
+- Initial Fedora package
diff --git a/sources b/sources
index e69de29..2b06ae5 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+1f331fc6e323ae12af0ac5a3f45d50e2  v0.6.1.tar.gz


More information about the scm-commits mailing list