]> git.pld-linux.org Git - packages/python-IPy.git/blame - python-IPy.spec
rebuild with python 3.10
[packages/python-IPy.git] / python-IPy.spec
CommitLineData
3506e45d 1# Conditional build:
78426673 2%bcond_without tests # unit tests
3506e45d
AM
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
3506e45d
AM
6%define module IPy
7%define egg_name IPy
8%define pypi_name IPy
391f4966 9Summary: Class and tools for handling of IPv4 and IPv6 addresses and networks
38a3cba1 10Summary(pl.UTF-8): Klasy i narzędzia do obsługi adresów i sieci IPv4 i IPv6
3506e45d 11Name: python-%{pypi_name}
ea45be62 12Version: 1.00
1eaf4015 13Release: 4
391f4966 14License: BSD
78bebdee 15Group: Libraries/Python
3506e45d 16Source0: https://pypi.debian.net/IPy/%{module}-%{version}.tar.gz
ea45be62 17# Source0-md5: 1a90c68174234672241a7e60c7ea0fb9
d77e90f4 18URL: https://github.com/haypo/python-ipy/wiki
1dc2749c 19BuildRequires: rpm-pythonprov
3506e45d
AM
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
22BuildRequires: python-modules
23BuildRequires: python-setuptools
24%endif
25%if %{with python3}
26BuildRequires: python3-modules
27BuildRequires: python3-setuptools
28%endif
29Requires: python-modules
30BuildArch: noarch
78bebdee
AM
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
1dc2749c
JB
34The IP class allows a comfortable parsing and handling for most
35notations in use for IPv4 and IPv6 Addresses and Networks. It was
36greatly inspired bei RIPE's Perl module Net::IP's interface but
37doesn't share the Implementation. It doesn't share non-CIDR netmasks,
38so funky stuff lixe a netmask 0xffffff0f can't be done here.
39
a18b2e7f
JR
40%description -l pl.UTF-8
41Klasa IP pozwala w wygodny sposób analizować i obsługiwać większość
42używanych notacji zapisu adresów i sieci IPv4 i IPv6. Jest w dużej
43części zainspirowana interfejsem modułu Perla RIPE Net::IP, ale nie
44współdzieli z nim implementacji. Nie dzieli masek sieciowych nie-CIDR,
45więc zabawne rzeczy typu maska 0xffffff0f są tutaj niewykonalne.
78bebdee 46
3506e45d 47%package -n python3-%{pypi_name}
c50a6d3d
AM
48Summary: Class and tools for handling of IPv4 and IPv6 addresses and networks
49Summary(pl.UTF-8): Klasy i narzędzia do obsługi adresów i sieci IPv4 i IPv6
3506e45d
AM
50Group: Libraries/Python
51Requires: python3-modules
52
53%description -n python3-%{pypi_name}
54The IP class allows a comfortable parsing and handling for most
55notations in use for IPv4 and IPv6 Addresses and Networks. It was
56greatly inspired bei RIPE's Perl module Net::IP's interface but
57doesn't share the Implementation. It doesn't share non-CIDR netmasks,
58so funky stuff lixe a netmask 0xffffff0f can't be done here.
59
60%description -n python3-%{pypi_name} -l pl.UTF-8
61Klasa IP pozwala w wygodny sposób analizować i obsługiwać większość
62używanych notacji zapisu adresów i sieci IPv4 i IPv6. Jest w dużej
63części zainspirowana interfejsem modułu Perla RIPE Net::IP, ale nie
64współdzieli z nim implementacji. Nie dzieli masek sieciowych nie-CIDR,
65więc zabawne rzeczy typu maska 0xffffff0f są tutaj niewykonalne.
66
78bebdee 67%prep
3506e45d 68%setup -q -n %{pypi_name}-%{version}
391f4966
AF
69
70%build
3506e45d 71%if %{with python2}
2c2826e9 72%py_build
78426673
AM
73%if %{with tests}
74for test in test/*.py; do
aa44e164
AM
75 # enable when this is fixed: https://github.com/autocracy/python-ipy/issues/27
76 [ "$test" = "test/test_fuzz.py" ] && continue
78426673
AM
77 PYTHONPATH=build-2 %{__python} "$test"
78done
79%endif
3506e45d
AM
80%endif
81
82%if %{with python3}
83%py3_build
78426673
AM
84%if %{with tests}
85for test in test/*.py; do
aa44e164
AM
86 # enable when this is fixed: https://github.com/autocracy/python-ipy/issues/27
87 [ "$test" = "test/test_fuzz.py" ] && continue
78426673
AM
88 PYTHONPATH=build-3 %{__python3} "$test"
89done
90%endif
3506e45d 91%endif
78bebdee
AM
92
93%install
94rm -rf $RPM_BUILD_ROOT
95
3506e45d
AM
96%if %{with python2}
97%py_install
98
99# when files are installed in other way that standard 'setup.py
100# they need to be (re-)compiled
101# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
102%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
103%py_comp $RPM_BUILD_ROOT%{py_sitedir}
78bebdee 104
2d0a0f5f 105%py_postclean
3506e45d
AM
106%endif
107
108%if %{with python3}
109%py3_install
110%endif
2d0a0f5f 111
78bebdee
AM
112%clean
113rm -rf $RPM_BUILD_ROOT
114
3506e45d 115%if %{with python2}
78bebdee
AM
116%files
117%defattr(644,root,root,755)
ea45be62 118%doc ChangeLog README.rst AUTHORS COPYING
3506e45d
AM
119%{py_sitescriptdir}/%{module}.py*
120%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
121%endif
122
123%if %{with python3}
124%files -n python3-%{pypi_name}
125%defattr(644,root,root,755)
ea45be62 126%doc ChangeLog README.rst AUTHORS COPYING
3506e45d
AM
127%{py3_sitescriptdir}/%{module}.py*
128%{py3_sitescriptdir}/__pycache__/%{module}.*.pyc
129%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
130%endif
This page took 0.113974 seconds and 4 git commands to generate.