summaryrefslogtreecommitdiff
path: root/python-ipy.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-10 16:52:35 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-10 16:52:35 +0000
commit27634a64a4576dcbc9e14efd767d296ce573047d (patch)
treedb0d2c07a5ceb1811243eef67a00bb39a4eeb98b /python-ipy.spec
parent44606644c3593bd1b9b62106609828fc446ffa75 (diff)
automatic import of python-ipy
Diffstat (limited to 'python-ipy.spec')
-rw-r--r--python-ipy.spec132
1 files changed, 132 insertions, 0 deletions
diff --git a/python-ipy.spec b/python-ipy.spec
new file mode 100644
index 0000000..e709c88
--- /dev/null
+++ b/python-ipy.spec
@@ -0,0 +1,132 @@
+%global _empty_manifest_terminate_build 0
+Name: python-IPy
+Version: 1.01
+Release: 1
+Summary: Class and tools for handling of IPv4 and IPv6 addresses and networks
+License: BSD License
+URL: https://github.com/autocracy/python-ipy
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/64/a4/9c0d88d95666ff1571d7baec6c5e26abc08051801feb6e6ddf40f6027e22/IPy-1.01.tar.gz
+BuildArch: noarch
+
+
+%description
+The IP class allows a comfortable parsing and handling for most
+notations in use for IPv4 and IPv6 addresses and networks. It was
+greatly inspired by RIPE's Perl module NET::IP's interface but
+doesn't share the implementation. It doesn't share non-CIDR netmasks,
+so funky stuff like a netmask of 0xffffff0f can't be done here. ::
+ >>> from IPy import IP
+ >>> ip = IP('127.0.0.0/30')
+ >>> for x in ip:
+ 127.0.0.0
+ 127.0.0.1
+ 127.0.0.2
+ 127.0.0.3
+ >>> ip2 = IP('0x7f000000/30')
+ >>> ip == ip2
+ 1
+ >>> ip.reverseNames()
+ ['0.0.0.127.in-addr.arpa.', '1.0.0.127.in-addr.arpa.', '2.0.0.127.in-addr.arpa.', '3.0.0.127.in-addr.arpa.']
+ >>> ip.reverseName()
+ '0-3.0.0.127.in-addr.arpa.'
+ >>> ip.iptype()
+ 'LOOPBACK'
+
+%package -n python3-IPy
+Summary: Class and tools for handling of IPv4 and IPv6 addresses and networks
+Provides: python-IPy
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-IPy
+The IP class allows a comfortable parsing and handling for most
+notations in use for IPv4 and IPv6 addresses and networks. It was
+greatly inspired by RIPE's Perl module NET::IP's interface but
+doesn't share the implementation. It doesn't share non-CIDR netmasks,
+so funky stuff like a netmask of 0xffffff0f can't be done here. ::
+ >>> from IPy import IP
+ >>> ip = IP('127.0.0.0/30')
+ >>> for x in ip:
+ 127.0.0.0
+ 127.0.0.1
+ 127.0.0.2
+ 127.0.0.3
+ >>> ip2 = IP('0x7f000000/30')
+ >>> ip == ip2
+ 1
+ >>> ip.reverseNames()
+ ['0.0.0.127.in-addr.arpa.', '1.0.0.127.in-addr.arpa.', '2.0.0.127.in-addr.arpa.', '3.0.0.127.in-addr.arpa.']
+ >>> ip.reverseName()
+ '0-3.0.0.127.in-addr.arpa.'
+ >>> ip.iptype()
+ 'LOOPBACK'
+
+%package help
+Summary: Development documents and examples for IPy
+Provides: python3-IPy-doc
+%description help
+The IP class allows a comfortable parsing and handling for most
+notations in use for IPv4 and IPv6 addresses and networks. It was
+greatly inspired by RIPE's Perl module NET::IP's interface but
+doesn't share the implementation. It doesn't share non-CIDR netmasks,
+so funky stuff like a netmask of 0xffffff0f can't be done here. ::
+ >>> from IPy import IP
+ >>> ip = IP('127.0.0.0/30')
+ >>> for x in ip:
+ 127.0.0.0
+ 127.0.0.1
+ 127.0.0.2
+ 127.0.0.3
+ >>> ip2 = IP('0x7f000000/30')
+ >>> ip == ip2
+ 1
+ >>> ip.reverseNames()
+ ['0.0.0.127.in-addr.arpa.', '1.0.0.127.in-addr.arpa.', '2.0.0.127.in-addr.arpa.', '3.0.0.127.in-addr.arpa.']
+ >>> ip.reverseName()
+ '0-3.0.0.127.in-addr.arpa.'
+ >>> ip.iptype()
+ 'LOOPBACK'
+
+%prep
+%autosetup -n IPy-1.01
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-IPy -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.01-1
+- Package Spec generated