diff --git a/python-stestr.spec b/python-stestr.spec index 99aa527..4cfcb2d 100644 --- a/python-stestr.spec +++ b/python-stestr.spec @@ -1,5 +1,4 @@ %global pypi_name stestr -%global with_doc 1 # Note(hguemar): PyYAML provide is scheduled to be removed %{?el7: %global pyyaml_pkg PyYAML} @@ -13,6 +12,10 @@ %bcond_with python3 %endif +# Enable bootstrap +%bcond_without bootstrap +%global with_doc 0 + %global common_desc \ stestr is a fork of the testrepository that concentrates on being a \ dedicated test runner for python projects. The generic abstraction layers \ @@ -92,11 +95,9 @@ BuildRequires: python3-pbr BuildRequires: python3-mock BuildRequires: python3-future BuildRequires: python3-subunit -BuildRequires: /usr/bin/subunit2sql-db-manage BuildRequires: python3-fixtures BuildRequires: python3-six BuildRequires: python3-sqlalchemy -BuildRequires: python3-subunit2sql BuildRequires: python3-testtools BuildRequires: python3-PyYAML BuildRequires: python3-ddt @@ -116,15 +117,20 @@ Requires: python3-voluptuous %description -n python3-%{pypi_name} %{common_desc} +%if %{without bootstrap} %package -n python3-%{pypi_name}-sql Summary: sql plugin for stestr Requires: python3-%{pypi_name} = %{version}-%{release} Requires: python3-subunit2sql +BuildRequires: python3-subunit2sql +BuildRequires: /usr/bin/subunit2sql-db-manage + %description -n python3-%{pypi_name}-sql It contains the sql plugin for stestr. %endif +%endif %if 0%{?with_doc} %package -n python-%{pypi_name}-doc @@ -222,9 +228,11 @@ PYTHON=%{__python3} %{__python3} setup.py test || : %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-*.egg-info +%if %{without bootstrap} %files -n python3-%{pypi_name}-sql %{python3_sitelib}/%{pypi_name}/repository/sql.py %endif +%endif %if 0%{?with_doc} %files -n python-%{pypi_name}-doc