File python-ipaddress.spec of Package python-ipaddress
# Created by pyp2rpm-3.2.3
%global pypi_name ipaddress
Name: python-%{pypi_name}
Version: 1.0.19
Release: 1%{?dist}
Summary: IPv4/IPv6 manipulation library
License: Python Software Foundation License
URL: https://github.com/phihag/ipaddress
Source0: https://pypi.io/packages/source/i/ipaddress/ipaddress-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python2-setuptools
%description
ipaddress provides the capabilities to create, manipulate and operate
on IPv4 and IPv6 addresses and networks.
The functions and classes in this module make it straightforward to
handle various tasks related to IP addresses, including checking
whether or not two hosts are on the same subnet, iterating over all
hosts in a particular subnet, checking whether or not a string
represents a valid IP address or network definition, and so on.
%package -n python2-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python2-%{pypi_name}}
%description -n python2-%{pypi_name}
ipaddress provides the capabilities to create, manipulate and operate
on IPv4 and IPv6 addresses and networks.
The functions and classes in this module make it straightforward to
handle various tasks related to IP addresses, including checking
whether or not two hosts are on the same subnet, iterating over all
hosts in a particular subnet, checking whether or not a string
represents a valid IP address or network definition, and so on.
%prep
%autosetup -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%py2_build
%install
%py2_install
%files -n python2-%{pypi_name}
%if (0%{?rhel} >= 7) || (0%{?suse_version} >= 1315)
%license LICENSE
%endif
%doc README.md
%{python2_sitelib}/%{pypi_name}.py*
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%changelog
* Fri Dec 22 2017 Yunfei Shi <shiyf2@lenovo.com> - 1.0.19-1
- Initial package.