From f404b226862038f8d721cbff697a7ddaba645ece Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Aug 15 2017 15:16:22 +0000 Subject: Rename bcond check to tests and add platform_python tests Bcond check was renamed to tests to unify it with other spec files. --- diff --git a/python-setuptools.spec b/python-setuptools.spec index 45626cd..9108be8 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -2,7 +2,7 @@ # Bootstrapping does not affect the platform-python-setuptools subpackage %bcond_with bootstrap -%bcond_without check +%bcond_with tests %bcond_without python2 %bcond_without python3 @@ -50,19 +50,19 @@ BuildRequires: python2-devel BuildRequires: python2-pip BuildRequires: python2-wheel %endif # without bootstrap -%if %{with check} +%if %{with test} BuildRequires: python2-pytest BuildRequires: python2-mock BuildRequires: python2-backports-unittest_mock -%endif # with check +%endif # with tests %endif # with python2 %if %{with python3} BuildRequires: python3-devel -%if %{with check} +%if %{with tests} BuildRequires: python3-pytest BuildRequires: python3-mock -%endif # with check +%endif # with tests %if %{without bootstrap} BuildRequires: python3-pip BuildRequires: python3-wheel @@ -72,9 +72,9 @@ BuildRequires: python3-wheel %if %{with platform_python} BuildRequires: platform-python-devel BuildRequires: platform-python-libs-devel -%if 0%{?with_check} +%if %{with tests} BuildRequires: platform-python-pytest -%endif # with_check +%endif # with tests %endif # with platform_python # We're now back to setuptools as the package. @@ -246,7 +246,7 @@ find %{buildroot}%{python2_sitelib} -name '*.exe' | xargs rm -f rm -r docs/{Makefile,conf.py,_*} -%if %{with check} +%if %{with tests} %check %if %{with python2} #LANG=en_US.utf8 PYTHONPATH=$(pwd) py.test @@ -255,7 +255,11 @@ rm -r docs/{Makefile,conf.py,_*} %if %{with python3} LANG=en_US.utf8 PYTHONPATH=$(pwd) py.test-%{python3_version} %endif # with python3 -%endif # with check + +%if %{with platform_python} +LANG=en_US.utf8 PYTHONPATH=$(pwd) %{__platform_python} -m pytest +%endif # with platform_python +%endif # with tests %if %{with python2} @@ -292,6 +296,7 @@ LANG=en_US.utf8 PYTHONPATH=$(pwd) py.test-%{python3_version} %changelog * Wed Aug 09 2017 Tomas Orsava - 36.2.0-6 - Add the platform-python subpackage +- Disable tests so platform-python stack can be bootstrapped (https://fedoraproject.org/wiki/Changes/Platform_Python_Stack) * Wed Aug 09 2017 Tomas Orsava - 36.2.0-5