diff --git a/python-mocket.changes b/python-mocket.changes index ef63558..193e782 100644 --- a/python-mocket.changes +++ b/python-mocket.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Aug 11 07:08:04 UTC 2020 - Tomáš Chvátal + +- Switch to multibuild as we create cycle with python-pook otherwise + ------------------------------------------------------------------- Sat Aug 8 13:00:29 UTC 2020 - Sebastian Wagner diff --git a/python-mocket.spec b/python-mocket.spec index a54243e..711aff4 100644 --- a/python-mocket.spec +++ b/python-mocket.spec @@ -17,12 +17,19 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -Name: python-mocket +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +Name: python-mocket%{psuffix} Version: 3.8.6 Release: 0 Summary: Python socket mock framework License: BSD-3-Clause -Group: Development/Languages/Python URL: https://github.com/mindflayer/python-mocket Source0: https://files.pythonhosted.org/packages/source/m/mocket/mocket-%{version}.tar.gz BuildRequires: %{python_module setuptools} @@ -38,7 +45,7 @@ Suggests: python-redis Suggests: python-requests Suggests: python-xxhash BuildArch: noarch -# SECTION test requirements +%if %{with test} BuildRequires: %{python_module PySocks} BuildRequires: %{python_module cryptography} BuildRequires: %{python_module decorator} @@ -57,7 +64,7 @@ BuildRequires: %{python_module xxhash} BuildRequires: ca-certificates-mozilla BuildRequires: python3-aiohttp BuildRequires: python3-async_timeout -# /SECTION +%endif %python_subpackages %description @@ -76,11 +83,14 @@ export LANG=en_US.UTF-8 %python_build %install +%if !%{with test} export LANG=en_US.UTF-8 %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif %check +%if %{with test} export LANG=en_US.UTF-8 export PYTHONPATH=${PWD} export SKIP_TRUE_HTTP=1 @@ -91,10 +101,13 @@ else $python -m pytest tests/main mocket tests/tests35/ -vv -k 'not RedisTestCase' fi } +%endif +%if !%{with test} %files %{python_files} %doc README.rst %license LICENSE %{python_sitelib}/* +%endif %changelog