diff --git a/python-sqlalchemy.spec b/python-sqlalchemy.spec index f8ef096..5a8e8cb 100644 --- a/python-sqlalchemy.spec +++ b/python-sqlalchemy.spec @@ -4,6 +4,9 @@ %global srcname SQLAlchemy +# when bootstrapping Python, pytest-xdist is not yet available +%bcond_with xdist + Name: python-sqlalchemy Version: 1.3.6 # cope with pre-release versions containing tildes @@ -26,8 +29,10 @@ BuildRequires: python2-pytest BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pytest +%if %{with xdist} BuildRequires: python3-pytest-xdist %endif +%endif %description SQLAlchemy is an Object Relational Mapper (ORM) that provides a flexible, @@ -108,7 +113,10 @@ rm -rf doc/build PYTHONPATH=. %{__python2} -m pytest test %if 0%{?with_python3} -PYTHONPATH=. %{__python3} -m pytest test --numprocesses=auto +PYTHONPATH=. %{__python3} -m pytest test \ +%if %{with xdist} +--numprocesses=auto +%endif %endif