Accepting request 830705 from devel:languages:python

- Switch to multibuild to not cycle with numpy

  * update testdata

OBS-URL: https://build.opensuse.org/request/show/830705
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-toml?expand=0&rev=6
This commit is contained in:
Dominique Leuenberger 2020-09-04 09:02:02 +00:00 committed by Git OBS Bridge
commit fefaad3c8e
3 changed files with 28 additions and 5 deletions

3
_multibuild Normal file
View File

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

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Aug 31 08:53:10 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Switch to multibuild to not cycle with numpy
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jun 8 10:32:52 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com> Mon Jun 8 10:32:52 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>

View File

@ -17,7 +17,15 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-toml %global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-toml%{psuffix}
Version: 0.10.1 Version: 0.10.1
Release: 0 Release: 0
Summary: Python module which parses and emits TOML Summary: Python module which parses and emits TOML
@ -28,13 +36,15 @@ Source: https://files.pythonhosted.org/packages/source/t/toml/toml-%{ver
Source1: https://github.com/BurntSushi/toml-test/archive/280497f.tar.gz#/toml-test-280497f.tar.gz Source1: https://github.com/BurntSushi/toml-test/archive/280497f.tar.gz#/toml-test-280497f.tar.gz
# Missing file https://github.com/uiri/toml/pull/231 # Missing file https://github.com/uiri/toml/pull/231
Source2: https://raw.githubusercontent.com/uiri/toml/%{version}/test.toml Source2: https://raw.githubusercontent.com/uiri/toml/%{version}/test.toml
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: coreutils BuildRequires: coreutils
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildArch: noarch BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytest}
%endif
%python_subpackages %python_subpackages
%description %description
@ -63,17 +73,22 @@ cp %{SOURCE2} .
%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}
%endif
%check %check
%if %{with test}
export LANG=en_US.UTF-8 export LANG=en_US.UTF-8
%pytest %pytest
%endif
%if !%{with test}
%files %{python_files} %files %{python_files}
# See https://github.com/uiri/toml/issues/216 re change log
%license LICENSE %license LICENSE
%doc README.rst %doc README.rst
%{python_sitelib} %{python_sitelib}
%endif
%changelog %changelog