%global modname daemonize Name: python-%{modname} Version: 2.4.7 Release: 1%{?dist} Summary: Library for writing system daemons in Python License: MIT URL: https://github.com/thesharp/daemonize Source0: %{url}/archive/v%{version}/%{modname}-%{version}.tar.gz BuildArch: noarch %global _description \ daemonize is a library for writing system daemons in Python. %description %{_description} %package -n python2-%{modname} Summary: %{summary} %{?python_provide:%python_provide python2-%{modname}} BuildRequires: python2-devel BuildRequires: python2-setuptools %description -n python2-%{modname} %{_description} Python 2 version. %package -n python3-%{modname} Summary: %{summary} %{?python_provide:%python_provide python3-%{modname}} BuildRequires: python3-devel BuildRequires: python3-setuptools %description -n python3-%{modname} %{_description} Python 3 version. %prep %autosetup -n %{modname}-%{version} %build %py2_build %py3_build %install %py2_install %py3_install %files -n python2-%{modname} %license LICENSE %doc README.rst %{python2_sitelib}/%{modname}-*.egg-info/ %{python2_sitelib}/%{modname}.py* %files -n python3-%{modname} %license LICENSE %doc README.rst %{python3_sitelib}/%{modname}-*.egg-info/ %{python3_sitelib}/%{modname}.py %{python3_sitelib}/__pycache__/%{modname}.* %changelog * Mon Jan 02 2017 Igor Gnatenko - 2.4.7-1 - Initial package