diff --git a/.python-cotyledon.metadata b/.python-cotyledon.metadata index e69de29..f3ae86f 100644 --- a/.python-cotyledon.metadata +++ b/.python-cotyledon.metadata @@ -0,0 +1 @@ +257c9e4cfa17e60025a7ca036250ca47623f639b SOURCES/cotyledon-1.7.3.tar.gz diff --git a/SPECS/python-cotyledon.spec b/SPECS/python-cotyledon.spec index 57412da..09d50ea 100644 --- a/SPECS/python-cotyledon.spec +++ b/SPECS/python-cotyledon.spec @@ -1,13 +1,5 @@ %global pypi_name cotyledon -%if 0%{?fedora} || 0%{?rhel} > 7 -%bcond_with python2 -%bcond_without python3 -%else -%bcond_without python2 -%bcond_with python3 -%endif - Name: python-%{pypi_name} Version: 1.7.3 Release: 8%{?dist} @@ -18,38 +10,6 @@ URL: https://cotyledon.readthedocs.io Source0: https://pypi.io/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch -%if %{with python2} -%package -n python2-%{pypi_name} -Summary: Cotyledon provides a framework for defining long-running services -%{?python_provide:%python_provide python2-cotyledon} - -BuildRequires: python2-devel -BuildRequires: python2-setuptools -BuildRequires: python2-setuptools_scm -BuildRequires: python2-pbr -# For building documentation -BuildRequires: python2-sphinx -BuildRequires: python-setproctitle - -Requires: python-setproctitle - -%description -n python2-%{pypi_name} -Cotyledon provides a framework for defining long-running services. - - -%package -n python2-%{pypi_name}-tests -Summary: Cotyledon provides a framework for defining long-running services -Requires: python2-%{pypi_name} = %{version}-%{release} -Requires: python2-oslotest -Requires: python2-testrepository -Requires: python2-testscenarios -Requires: python2-testtools - -%description -n python2-%{pypi_name}-tests -Cotyledon provides a framework for defining long-running services. -%endif - -%if %{with python3} %package -n python3-%{pypi_name} Summary: Cotyledon provides a framework for defining long-running services BuildRequires: python3-devel @@ -77,7 +37,6 @@ Requires: python3-testtools Cotyledon provides a framework for defining long-running services. This package contains test files -%endif %package doc Summary: Documentation for %{name} @@ -93,68 +52,25 @@ Cotyledon provides a framework for defining long-running services. %prep %setup -q -n %{pypi_name}-%{version} -%if %{with python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif - # Let RPM handle the requirements rm -f {,test-}requirements.txt %build -%if %{with python2} -%py2_build -%endif -%if %{with python3} -pushd %{py3dir} -%{__python3} setup.py build -popd -%endif - -%if %{with python2} -export PYTHONPATH="$( pwd ):$PYTHONPATH" -sphinx-build -b html doc/source html -%else +%py3_build + export PYTHONPATH="$( pwd ):$PYTHONPATH" sphinx-build-3 -b html doc/source html -%endif # Fix hidden-file-or-dir warnings rm -rf html/.doctrees html/.buildinfo %install -%if %{with python2} -%{__python2} setup.py install --skip-build --root %{buildroot} -%endif - -%if %{with python3} -pushd %{py3dir} -%{__python3} setup.py install --skip-build --root %{buildroot} -popd -%endif +%py3_install %check -%if %{with python3} %{__python3} setup.py test ||: rm -rf .testrepository -%endif -%if %{with python2} -%{__python2} setup.py test ||: -%endif -%if %{with python2} -%files -n python2-%{pypi_name} -%doc README.rst -%license LICENSE -%{python2_sitelib}/%{pypi_name} -%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info - -%files -n python2-%{pypi_name}-tests -%license LICENSE -%{python2_sitelib}/%{pypi_name}/tests/ -%endif - -%if %{with python3} %files -n python3-%{pypi_name} %doc README.rst %license LICENSE @@ -165,8 +81,6 @@ rm -rf .testrepository %license LICENSE %{python3_sitelib}/%{pypi_name}/tests -%endif - %files doc %doc html