# Created by pyp2rpm-3.1.1 %global pypi_name maxminddb %global sum Reader for the MaxMind DB format %global desc This is a Python module for reading MaxMind DB files. \ The module includes both a pure Python reader and an optional \ C extension. MaxMind DB is a binary file format that stores data \ indexed by IP address subnets (IPv4 or IPv6). Name: python-%{pypi_name} Version: 1.2.1 Release: 1%{?dist} Summary: %{sum} License: ASL 2.0 URL: http://www.maxmind.com/ Source0: https://files.pythonhosted.org/packages/source/m/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildRequires: libmaxminddb-devel BuildRequires: python-ipaddress BuildRequires: python-nose BuildRequires: python-setuptools BuildRequires: python2-devel BuildRequires: python3-nose BuildRequires: python3-setuptools BuildRequires: python3-devel %description %{desc} %package doc Summary: Documentation for %{pypi_name} %description doc This package provides the documentation for %{pypi_name}. %package -n python2-%{pypi_name} Summary: %{sum} %{?python_provide:%python_provide python2-%{pypi_name}} %description -n python2-%{pypi_name} %{desc} %package -n python3-%{pypi_name} Summary: %{sum} %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} %{desc} %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %py3_build %install # Must do the subpackages' install first because the scripts in /usr/bin are # overwritten with every setup.py install. %py3_install %py2_install %check %{__python2} setup.py test %{__python3} setup.py test %files doc %doc docs/* %files -n python2-%{pypi_name} %doc README.rst %license LICENSE %{python2_sitearch}/%{pypi_name} %{python2_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info %files -n python3-%{pypi_name} %doc README.rst %license LICENSE %{python3_sitearch}/%{pypi_name} %{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info %changelog * Wed Jun 15 2016 Lumir Balhar - 1.2.1-1 - Initial package.