- Use multibuild to avoid cycles with pytest
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtualenv?expand=0&rev=71
This commit is contained in:
parent
33e019dfea
commit
db4fbaa216
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 17 18:01:51 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Use multibuild to avoid cycles with pytest
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Sep 16 10:20:57 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
Mon Sep 16 10:20:57 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
@ -17,7 +17,15 @@
|
|||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-virtualenv
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%define psuffix -test
|
||||||
|
%bcond_without test
|
||||||
|
%else
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%bcond_with test
|
||||||
|
%endif
|
||||||
|
Name: python-virtualenv%{psuffix}
|
||||||
Version: 16.7.5
|
Version: 16.7.5
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Virtual Python Environment builder
|
Summary: Virtual Python Environment builder
|
||||||
@ -25,11 +33,14 @@ License: MIT
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: http://www.virtualenv.org/
|
URL: http://www.virtualenv.org/
|
||||||
Source: https://files.pythonhosted.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
|
||||||
|
%if %{with test}
|
||||||
BuildRequires: %{python_module mock}
|
BuildRequires: %{python_module mock}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module pypiserver}
|
BuildRequires: %{python_module pypiserver}
|
||||||
BuildRequires: %{python_module pytest-localserver}
|
BuildRequires: %{python_module pytest-localserver}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
|
BuildRequires: %{python_module virtualenv >= %{version}}
|
||||||
|
%endif
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@ -68,16 +79,21 @@ libraries either).
|
|||||||
%python_build
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if !%{with test}
|
||||||
%python_install
|
%python_install
|
||||||
%python_expand fdupes %{buildroot}%{$python_sitelib}
|
%python_expand fdupes %{buildroot}%{$python_sitelib}
|
||||||
%python_clone -a %{buildroot}%{_bindir}/virtualenv
|
%python_clone -a %{buildroot}%{_bindir}/virtualenv
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with test}
|
||||||
# test_bootstrap is tied to python2 command calls, skip it
|
# test_bootstrap is tied to python2 command calls, skip it
|
||||||
# test_always_copy_option does not handle system install dirs in /usr/lib64
|
# test_always_copy_option does not handle system install dirs in /usr/lib64
|
||||||
# test_wheel_invocation_dash_p or test_use_from_wheel or test_wheel_contains or test_wheel_basic_invocation; online tests
|
# test_wheel_invocation_dash_p or test_use_from_wheel or test_wheel_contains or test_wheel_basic_invocation; online tests
|
||||||
%pytest -k 'not (test_always_copy_option or test_bootstrap or test_use_from_wheel or test_wheel_contains or test_wheel_basic_invocation or test_wheel_invocation_dash_p)'
|
%pytest -k 'not (test_always_copy_option or test_bootstrap or test_use_from_wheel or test_wheel_contains or test_wheel_basic_invocation or test_wheel_invocation_dash_p)'
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if !%{with test}
|
||||||
%post
|
%post
|
||||||
%python_install_alternative virtualenv
|
%python_install_alternative virtualenv
|
||||||
|
|
||||||
@ -90,5 +106,6 @@ libraries either).
|
|||||||
%{python_sitelib}/virtualenv*
|
%{python_sitelib}/virtualenv*
|
||||||
%python_alternative %{_bindir}/virtualenv
|
%python_alternative %{_bindir}/virtualenv
|
||||||
%pycache_only %{python_sitelib}/__pycache__
|
%pycache_only %{python_sitelib}/__pycache__
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user