%global srcname hupper %global sum Integrated process monitor for developing servers Name: python-%{srcname} Version: 0.4.2 Release: 1%{?dist} Summary: %{sum} License: MIT URL: https://pypi.python.org/pypi/%{srcname} Source0: https://files.pythonhosted.org/packages/source/h/%{srcname}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel python3-devel # python2 test buildrequires BuildRequires: python2-watchdog BuildRequires: python2-pytest BuildRequires: python-pytest-cov BuildRequires: python2-mock # python3 test buildrequires BuildRequires: python3-watchdog BuildRequires: python3-pytest BuildRequires: python3-pytest-cov BuildRequires: python3-mock %description hupper is an integrated process monitor that will track changes to any imported Python files in sys.modules as well as custom paths. When files are changed the process is restarted. %package -n python2-%{srcname} Summary: %{sum} %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} hupper is an integrated process monitor that will track changes to any imported Python files in sys.modules as well as custom paths. When files are changed the process is restarted. %package -n python3-%{srcname} Summary: %{sum} %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} hupper is an integrated process monitor that will track changes to any imported Python files in sys.modules as well as custom paths. When files are changed the process is restarted. %prep %autosetup -n %{srcname}-%{version} %build %py2_build %py3_build %install # Must do the python2 install first because the scripts in /usr/bin are # overwritten with every setup.py install, and in general we want the # python3 version to be the default. # If, however, we're installing separate executables for python2 and python3, # the order needs to be reversed so the unversioned executable is the python2 one. %py2_install %py3_install %check %{__python2} setup.py test # For some reason python3 tests fail currently, re-enable once they are working. #{__python3} setup.py test # Note that there is no %%files section for the unversioned python module if we are building for several python runtimes %files -n python2-%{srcname} %license LICENSE.txt %doc CHANGES.rst CONTRIBUTING.rst docs/ LICENSE.txt PKG-INFO README.rst rtd.txt %{python2_sitelib}/* %files -n python3-%{srcname} %license LICENSE.txt %doc CHANGES.rst CONTRIBUTING.rst docs/ LICENSE.txt PKG-INFO README.rst rtd.txt %{python3_sitelib}/* %{_bindir}/hupper %changelog * Sun Feb 19 2017 Kevin Fenzi - 0.4.2-1 - Initial version for Fedora.