%global pypi_name rfc3987 Name: python-%{pypi_name} Version: 1.3.7 Release: 1%{?dist} Summary: Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987) License: GPLv3+ URL: https://github.com/dgerber/rfc3987 Source0: https://files.pythonhosted.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %global _description \ This module provides regular expressions according to RFC 3986 "Uniform\ Resource Identifier (URI): Generic Syntax" \ and RFC 3987 "Internationalized Resource Identifiers (IRIs)"\ , and utilities for composition and\ relative resolution of references. %description %{_description} %package -n python2-%{pypi_name} Summary: Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987) %{?python_provide:%python_provide python2-%{pypi_name}} BuildRequires: python-setuptools BuildRequires: python2-devel %description -n python2-%{pypi_name} %{_description} %package -n python3-%{pypi_name} Summary: Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987) %{?python_provide:%python_provide python3-%{pypi_name}} BuildRequires: python3-setuptools BuildRequires: python3-devel %description -n python3-%{pypi_name} %{_description} This package includes the Python 3 version of the module. %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %py3_build %install %py2_install %py3_install %check %{__python2} -m doctest -v %{pypi_name}.py %{__python3} -m doctest -v %{pypi_name}.py %files -n python2-%{pypi_name} %license COPYING.txt %doc README.txt %{python2_sitelib}/%{pypi_name}.py* %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %files -n python3-%{pypi_name} %license COPYING.txt %doc README.txt %{python3_sitelib}/%{pypi_name}.py %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %{python3_sitelib}/__pycache__/%{pypi_name}.* %changelog * Tue Apr 11 2017 Eduardo Mayorga Téllez - 1.3.7-1 - Update to 1.3.7 - Include license text from tarball * Wed Dec 21 2016 Eduardo Mayorga Téllez - 1.3.6-2 - Call doctest in %%check * Mon Jul 18 2016 Eduardo Mayorga Téllez - 1.3.6-1 - Initial packaging