%global pypi_name netfilter Name: python-%{pypi_name} Version: 0.6.4 Release: 1%{?dist} Summary: Python modules for manipulating netfilter rules License: GPLv3+ URL: https://github.com/jlaine/python-netfilter Source0: https://files.pythonhosted.org/packages/source/n/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python3-devel BuildRequires: python3-setuptools %description python-netfilter is a set of modules for the Python programming language which allows you to manipulate netfilter rules. %package -n python2-%{pypi_name} Summary: Python modules for manipulating netfilter rules %{?python_provide:%python_provide python2-%{pypi_name}} %description -n python2-%{pypi_name} python-netfilter is a set of modules for the Python programming language which allows you to manipulate netfilter rules. %package -n python3-%{pypi_name} Summary: Python modules for manipulating netfilter rules %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} python-netfilter is a set of modules for the Python programming language which allows you to manipulate netfilter rules. %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %py3_build %install %py3_install %py2_install %check %{__python2} setup.py test %{__python3} setup.py test %files -n python2-%{pypi_name} %doc README.md %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %files -n python3-%{pypi_name} %doc README.md %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog * Sun Apr 02 2017 Felix Kaechele - 0.6.4-1 - Initial package.