%global pypi_name docopt Name: python-%{pypi_name} Version: 0.6.2 Release: 1%{?dist} Summary: Python argument parser, that will make you smile License: MIT URL: http://docopt.org Source0: https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python-setuptools BuildRequires: python2-devel BuildRequires: python3-setuptools BuildRequires: python3-devel %description docopt creates beautiful command-line interfaces. %package -n python2-%{pypi_name} Summary: Python argument parser, that will make you smile %{?python_provide:%python_provide python2-%{pypi_name}} %description -n python2-%{pypi_name} docopt creates beautiful command-line interfaces. %package -n python3-%{pypi_name} Summary: Python argument parser, that will make you smile %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} docopt creates *beautiful* command-line interfaces. %prep %autosetup -n %{pypi_name}-%{version} rm -rf %{pypi_name}.egg-info %build %py2_build %py3_build %install %py3_install %py2_install %files -n python2-%{pypi_name} %license LICENSE-MIT %doc README.rst %{python2_sitelib}/%{pypi_name}.py* %{python2_sitelib}/%{pypi_name}-%{version}-py*egg-info %files -n python3-%{pypi_name} %license LICENSE-MIT %doc README.rst %{python3_sitelib}/__pycache__/* %{python3_sitelib}/%{pypi_name}.py %{python3_sitelib}/%{pypi_name}-%{version}-py*egg-info %changelog * Wed Oct 05 2016 David Hannequin - 0.6.2-1 - Initial package.