# Created by pyp2rpm-1.0.0 %global pypi_name pytest %define version 2.3.5 Name: python-test Version: %{version} Release: %mkrel 4 Group: Development/Python Summary: py.test: simple powerful testing with Python License: MIT URL: http://pytest.org Source0: http://pypi.python.org/packages/source/p/pytest/pytest-%{version}.tar.gz BuildArch: noarch BuildRequires: python-devel BuildRequires: python-sphinx BuildRequires: python-setuptools Requires: python-py >= 1.4.13 %description The `py.test`` testing tool makes it easy to write small tests, yet scales to support complex functional testing. It provides - auto-discovery of test modules and functions, - detailed info on failing `assert statements %package -n python3-test Summary: %{summary} / Python 3 library BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-py >= 1.4.13 %description -n python3-test The `py.test`` testing tool makes it easy to write small tests, yet scales to support complex functional testing. It provides - auto-discovery of test modules and functions, - detailed info on failing `assert statements %prep %setup -q -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info # generate html docs sphinx-build doc/en html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} cd .. cp -r %{pypi_name}-%{version} python3 cd - %build %{__python} setup.py build cd ../python3 %{__python3} setup.py build cd - %install cd ../python3 %{__python3} setup.py install --skip-build --root %{buildroot} cd - # default to python2 flavour of pytest rm -f %{buildroot}%{_bindir}/py.test %{__python} setup.py install --skip-build --root %{buildroot} %files %doc html README.rst LICENSE CHANGELOG %{_bindir}/py.test %{_bindir}/py.test-%{pyver} %{python_sitelib}/* %files -n python3-test %doc html README.rst LICENSE CHANGELOG %{_bindir}/py.test-%{py3ver} %{python3_sitelib}/*