From 428bc89be39a8e7594c2d45fc69d39e8c308c4d309d74488bdb30acb11adf2e1 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 13 Oct 2021 19:35:30 +0000 Subject: [PATCH 1/5] Accepting request 925175 from home:bnavigator:branches:devel:languages:python - Split build and tests in _multibuild in order to avoid depcycle OBS-URL: https://build.opensuse.org/request/show/925175 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tomli?expand=0&rev=4 --- _multibuild | 3 +++ python-tomli.changes | 5 +++++ python-tomli.spec | 21 ++++++++++++++++++--- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 _multibuild 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-tomli.changes b/python-tomli.changes index 462369c..15d363c 100644 --- a/python-tomli.changes +++ b/python-tomli.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Oct 13 19:20:13 UTC 2021 - Ben Greiner + +- Split build and tests in _multibuild in order to avoid depcycle + ------------------------------------------------------------------- Sun Oct 3 19:30:44 UTC 2021 - Ben Greiner diff --git a/python-tomli.spec b/python-tomli.spec index 941aee7..ce6104c 100644 --- a/python-tomli.spec +++ b/python-tomli.spec @@ -16,6 +16,14 @@ # +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif %{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 Name: python-tomli @@ -26,11 +34,14 @@ License: MIT URL: https://github.com/hukkin/tomli # prefer github archive over pypi sdist for pacakged tests Source: https://github.com/hukkin/tomli/archive/refs/tags/%{version}.tar.gz#/tomli-%{version}-gh.tar.gz +%if !%{with test} BuildRequires: %{python_module flit-core} BuildRequires: %{python_module pip} +%else BuildRequires: %{python_module pytest-randomly} BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-dateutil} +%endif BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch @@ -42,6 +53,7 @@ Tomli is a Python library for parsing TOML %prep %setup -q -n tomli-%{version} +%if ! %{with test} %build %pyproject_wheel @@ -49,13 +61,16 @@ Tomli is a Python library for parsing TOML %pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -%check -%pytest - %files %{python_files} %license LICENSE %doc README.md %{python_sitelib}/tomli %{python_sitelib}/tomli-%{version}*-info +%else + +%check +%pytest +%endif + %changelog From 5c284bc4d36fd673a2850508deb099dad7727970f68aafb376c8a73143fc7bb9 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 14 Oct 2021 15:04:48 +0000 Subject: [PATCH 2/5] Fix name of the package with multibuild OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tomli?expand=0&rev=5 --- python-tomli.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python-tomli.spec b/python-tomli.spec index ce6104c..24ea2b1 100644 --- a/python-tomli.spec +++ b/python-tomli.spec @@ -1,5 +1,5 @@ # -# spec file for package python-tomli +# spec file # # Copyright (c) 2021 SUSE LLC # @@ -26,7 +26,7 @@ %endif %{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 -Name: python-tomli +Name: python-tomli%{psuffix} Version: 1.2.1 Release: 0 Summary: A lil' TOML parser @@ -53,11 +53,11 @@ Tomli is a Python library for parsing TOML %prep %setup -q -n tomli-%{version} -%if ! %{with test} %build %pyproject_wheel %install +%if ! %{with test} %pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} From 5c70399d43b350147eca8f1d34127e298a4adde0fc1dd9764e7109b544499610 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 14 Oct 2021 15:16:41 +0000 Subject: [PATCH 3/5] Fix BRs OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tomli?expand=0&rev=6 --- python-tomli.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python-tomli.spec b/python-tomli.spec index 24ea2b1..9d18a3b 100644 --- a/python-tomli.spec +++ b/python-tomli.spec @@ -34,10 +34,9 @@ License: MIT URL: https://github.com/hukkin/tomli # prefer github archive over pypi sdist for pacakged tests Source: https://github.com/hukkin/tomli/archive/refs/tags/%{version}.tar.gz#/tomli-%{version}-gh.tar.gz -%if !%{with test} BuildRequires: %{python_module flit-core} BuildRequires: %{python_module pip} -%else +%if %{with test} BuildRequires: %{python_module pytest-randomly} BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-dateutil} From b4a3cde0b67224e1e37af29cab5ae1199885db44645791ad6702c621d7a758cf Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 15 Oct 2021 09:27:33 +0000 Subject: [PATCH 4/5] Accepting request 925389 from home:dimstar:Factory - BuildIgnore ca-certificates: python-pip brings it in for regular operation, but as we do not ever do https:// connections during a build we do not depend on certificates. Allows us to break up a build cycle. OBS-URL: https://build.opensuse.org/request/show/925389 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tomli?expand=0&rev=7 --- python-tomli.changes | 8 ++++++++ python-tomli.spec | 1 + 2 files changed, 9 insertions(+) diff --git a/python-tomli.changes b/python-tomli.changes index 15d363c..19752cf 100644 --- a/python-tomli.changes +++ b/python-tomli.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Oct 15 08:49:47 UTC 2021 - Dominique Leuenberger + +- BuildIgnore ca-certificates: python-pip brings it in for regular + operation, but as we do not ever do https:// connections during a + build we do not depend on certificates. Allows us to break up a + build cycle. + ------------------------------------------------------------------- Wed Oct 13 19:20:13 UTC 2021 - Ben Greiner diff --git a/python-tomli.spec b/python-tomli.spec index 9d18a3b..bcca4da 100644 --- a/python-tomli.spec +++ b/python-tomli.spec @@ -36,6 +36,7 @@ URL: https://github.com/hukkin/tomli Source: https://github.com/hukkin/tomli/archive/refs/tags/%{version}.tar.gz#/tomli-%{version}-gh.tar.gz BuildRequires: %{python_module flit-core} BuildRequires: %{python_module pip} +#!BuildIgnore: ca-certificates %if %{with test} BuildRequires: %{python_module pytest-randomly} BuildRequires: %{python_module pytest} From cc5af0d4e723a57c4a39636f3fa51c7d0b8d088b53a01bf0c9d04b141616a95c Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 15 Oct 2021 20:32:52 +0000 Subject: [PATCH 5/5] Accepting request 925542 from home:bnavigator:branches:devel:languages:python - Yet another dependency cycle to break: tomli - flit_core - tomli https://flit.readthedocs.io/en/latest/bootstrap.html OBS-URL: https://build.opensuse.org/request/show/925542 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tomli?expand=0&rev=8 --- python-tomli.changes | 6 ++++++ python-tomli.spec | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-tomli.changes b/python-tomli.changes index 19752cf..08ca7c2 100644 --- a/python-tomli.changes +++ b/python-tomli.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Oct 15 19:03:22 UTC 2021 - Ben Greiner + +- Yet another dependency cycle to break: tomli - flit_core - tomli + https://flit.readthedocs.io/en/latest/bootstrap.html + ------------------------------------------------------------------- Fri Oct 15 08:49:47 UTC 2021 - Dominique Leuenberger diff --git a/python-tomli.spec b/python-tomli.spec index bcca4da..2a7a537 100644 --- a/python-tomli.spec +++ b/python-tomli.spec @@ -36,7 +36,14 @@ URL: https://github.com/hukkin/tomli Source: https://github.com/hukkin/tomli/archive/refs/tags/%{version}.tar.gz#/tomli-%{version}-gh.tar.gz BuildRequires: %{python_module flit-core} BuildRequires: %{python_module pip} -#!BuildIgnore: ca-certificates +# Avoid build cycles +# https://flit.readthedocs.io/en/latest/bootstrap.html +#!BuildIgnore: python3-tomli +#!BuildIgnore: python36-tomli +#!BuildIgnore: python38-tomli +#!BuildIgnore: python39-tomli +#!BuildIgnore: python310-tomli +#!BuildIgnore: ca-certificates %if %{with test} BuildRequires: %{python_module pytest-randomly} BuildRequires: %{python_module pytest} @@ -54,6 +61,7 @@ Tomli is a Python library for parsing TOML %setup -q -n tomli-%{version} %build +export PYTHONPATH=$PWD %pyproject_wheel %install