diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-itemadapter.changes b/python-itemadapter.changes index 992ef9c..6e7c59b 100644 --- a/python-itemadapter.changes +++ b/python-itemadapter.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jul 8 06:54:27 UTC 2020 - Tomáš Chvátal + +- Switch to multibuild +- Fix the sitelib/sitearch and all the dependencies + ------------------------------------------------------------------- Tue Jul 7 23:30:56 UTC 2020 - Jacob W diff --git a/python-itemadapter.spec b/python-itemadapter.spec index 1e2c922..2865a5b 100644 --- a/python-itemadapter.spec +++ b/python-itemadapter.spec @@ -18,24 +18,31 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif %define skip_python2 1 -Name: python-itemadapter +Name: python-itemadapter%{psuffix} Version: 0.1.0 Release: 0 Summary: Wrapper for data container objects License: BSD-3-Clause URL: https://github.com/scrapy/itemadapter Source: https://github.com/scrapy/itemadapter/archive/v%{version}.tar.gz#/itemadapter-%{version}.tar.gz -BuildRequires: %{python_module Scrapy >= 2.2.0} -BuildRequires: %{python_module attrs} -BuildRequires: %{python_module devel} -BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools >= 40.5.0} BuildRequires: fdupes -BuildRequires: pkgconfig BuildRequires: python-rpm-macros -BuildRequires: pkgconfig(libffi) Requires: python-attrs +%if %{with test} +BuildRequires: %{python_module Scrapy >= 2.0} +BuildRequires: %{python_module attrs} +BuildRequires: %{python_module pytest >= 5.4} +%endif %python_subpackages %description @@ -47,20 +54,25 @@ manner, regardless of their underlying implementation. %setup -q -n itemadapter-%{version} %build -export CFLAGS="%{optflags}" %python_build %install +%if !%{with test} %python_install -%python_expand %fdupes %{buildroot}%{$python_sitearch} +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif %check +%if %{with test} %pytest +%endif +%if !%{with test} %files %{python_files} %license LICENSE %doc README.md %{python_sitelib}/itemadapter %{python_sitelib}/itemadapter-%{version}-py*.egg-info +%endif %changelog