From fecc57d7e7eb9b50ecd202710180002afbd47c27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 15 Aug 2019 17:59:33 +0200 Subject: [PATCH] When bootstrapping Python, pytest-xdist is not yet available --- python-sqlalchemy.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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