17
0

- Switch to multibuild in order to avoid cycle

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-EasyProcess?expand=0&rev=37
This commit is contained in:
Tomáš Chvátal
2020-03-26 16:05:52 +00:00
committed by Git OBS Bridge
parent f0bea1853e
commit 082af57d8a
3 changed files with 28 additions and 11 deletions

3
_multibuild Normal file
View File

@@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Mar 26 16:00:25 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Switch to multibuild in order to avoid cycle
-------------------------------------------------------------------
Thu Mar 26 09:06:42 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>

View File

@@ -17,21 +17,31 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-EasyProcess
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-EasyProcess%{psuffix}
Version: 0.2.10
Release: 0
Summary: Python subprocess interface
License: BSD-2-Clause
URL: https://github.com/ponty/easyprocess
Source: https://github.com/ponty/EasyProcess/archive/%{version}.tar.gz
BuildRequires: %{python_module PyVirtualDisplay}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: fdupes
BuildRequires: iputils
BuildRequires: python-rpm-macros
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module PyVirtualDisplay}
BuildRequires: %{python_module nose}
BuildRequires: %{python_module six}
%endif
%python_subpackages
%description
@@ -58,28 +68,27 @@ Limitations:
%prep
%setup -q -n EasyProcess-%{version}
# https://github.com/ponty/EasyProcess/issues/18
sed -i "s/from easyprocess import EasyProcess/from easyprocess import EasyProcess;import sys/" easyprocess/examples/*.py
sed -i "s/'python /sys.executable + ' /" easyprocess/examples/*.py
sed -i "s/'python'/sys.executable/" easyprocess/examples/*.py
# requires pyvirtualdisplay which is mostly dead package
rm -f tests/coverage/fast/test_deadlock.py
%build
%python_build
%install
%if !%{with test}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check
%if %{with test}
export LANG=en_US.UTF-8
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} nosetests-%{$python_bin_suffix} -v tests/
%endif
%if !%{with test}
%files %{python_files}
%license LICENSE.txt
%doc README.rst
%{python_sitelib}/*
%endif
%changelog