When bootstrapping Python, pytest-xdist is not yet available

This commit is contained in:
Miro Hrončok 2019-08-15 17:59:33 +02:00
parent eb6b56bf75
commit fecc57d7e7
1 changed files with 9 additions and 1 deletions

View File

@ -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