From 4733ba669c096a9db436c734cfa48670344f8b65da3676465871b45da9a07896 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Sun, 9 Oct 2022 15:50:00 +0000 Subject: [PATCH] Accepting request 1009163 from home:bnavigator:branches:devel:languages:python The devel package is already broken, at least have it in the most recent state - Make multibuild because of circular dependencies with python-poetry-plugin-export OBS-URL: https://build.opensuse.org/request/show/1009163 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-poetry?expand=0&rev=47 --- _multibuild | 3 ++ python-poetry.changes | 2 ++ python-poetry.spec | 68 +++++++++++++++++++++++-------------------- 3 files changed, 42 insertions(+), 31 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-poetry.changes b/python-poetry.changes index 7e66763..f439e2c 100644 --- a/python-poetry.changes +++ b/python-poetry.changes @@ -28,6 +28,8 @@ Sun Oct 9 12:43:51 UTC 2022 - Ben Greiner * poetry-1645-1.1.patch * poetry-4749-1.1.patch * use-new-name-of-MockFixture.patch +- Make multibuild because of circular dependencies with + python-poetry-plugin-export ------------------------------------------------------------------- Fri Aug 26 16:23:30 UTC 2022 - Ben Greiner diff --git a/python-poetry.spec b/python-poetry.spec index d5ab4f0..4ba8fbf 100644 --- a/python-poetry.spec +++ b/python-poetry.spec @@ -16,6 +16,15 @@ # +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif + Name: python-poetry Version: 1.2.1 Release: 0 @@ -25,39 +34,22 @@ Group: Development/Languages/Python URL: https://python-poetry.org/ # PyPI sdist doesnt contain tests Source: https://github.com/python-poetry/poetry/archive/%{version}.tar.gz#/poetry-%{version}.tar.gz -BuildRequires: %{python_module CacheControl >= 0.12.9} BuildRequires: %{python_module base >= 3.7} -BuildRequires: %{python_module cachy >= 0.3.0} -BuildRequires: %{python_module cleo >= 1.0.0~a5} -BuildRequires: %{python_module crashtest >= 0.3.0} -BuildRequires: %{python_module html5lib >= 1.0} -BuildRequires: %{python_module importlib-metadata >= 4.4 if %python-base < 3.10} -BuildRequires: %{python_module jsonschema >= 4.10.0} -BuildRequires: %{python_module keyring >= 21.2.0} -BuildRequires: %{python_module plugin-export >= 1.0.7} -BuildRequires: %{python_module poetry-core >= 1.2.0} -# cachecontrol[filecache] -BuildRequires: %{python_module lockfile >= 0.9} -BuildRequires: %{python_module packaging >= 20.4} -BuildRequires: %{python_module pexpect >= 4.7.0} BuildRequires: %{python_module pip} -BuildRequires: %{python_module pkginfo >= 1.5} -BuildRequires: %{python_module requests >= 2.18} -BuildRequires: %{python_module requests-toolbelt >= 0.9.1} -BuildRequires: %{python_module shellingham >= 1.5} -BuildRequires: %{python_module tomlkit >= 0.11.4} -BuildRequires: %{python_module virtualenv >= 20.4.7} +BuildRequires: %{python_module poetry-core >= 1.1} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-CacheControl >= 0.12.9 Requires: python-cachy >= 0.3.0 Requires: python-cleo >= 1.0.0~a5 Requires: python-crashtest >= 0.3.0 +Requires: python-dulwich >= 0.20.46 Requires: python-html5lib >= 1.0 Requires: python-jsonschema >= 4.10.0 Requires: python-keyring >= 21.2.0 -Requires: python-plugin-export >= 1.0.7 Requires: python-poetry-core >= 1.2.0 +Requires: python-poetry-plugin-export >= 1.0.7 +Requires: python-urllib3 >= 1.26.0 # cachecontrol[filecache] Requires: python-lockfile >= 0.9 Requires: python-packaging >= 20.4 @@ -67,7 +59,7 @@ Requires: python-requests >= 2.18 Requires: python-requests-toolbelt >= 0.9.1 Requires: python-shellingham >= 1.5 Requires: python-tomlkit >= 0.11.4 -Requires: python-virtualenv >= 20.47 +Requires: python-virtualenv >= 20.4.7 %if 0%{?python_version_nodots} < 310 Requires: python-importlib-metadata >= 4.4 %endif @@ -76,12 +68,17 @@ Requires(postun):update-alternatives Recommends: git-core Recommends: python-devel BuildArch: noarch -# SECTION test requirements -BuildRequires: %{python_module httpretty >= 1.0.3} +%if %{with test} +BuildRequires: %{python_module deepdiff >= 5.0} +BuildRequires: %{python_module flatdict >= 4.0.1} +BuildRequires: %{python_module httpretty >= 1.0} +BuildRequires: %{python_module poetry = %{version}} +BuildRequires: %{python_module psutil} +BuildRequires: %{python_module pytest >= 7.1} BuildRequires: %{python_module pytest-mock >= 3.5} -BuildRequires: %{python_module pytest} +BuildRequires: %{python_module pytest-xdist} BuildRequires: git-core -# /SECTION +%endif %python_subpackages %description @@ -91,8 +88,14 @@ Python dependency management and packaging made easy. %autosetup -p1 -n poetry-%{version} rm src/poetry/_vendor/.gitignore rmdir src/poetry/_vendor -find poetry -name '*.py' -executable -print0 | xargs -0 chmod a-x +for f in console/commands/source/update.py \ + console/events/console_events.py \ + layouts/standard.py; do + [ -e src/poetry/$f ] || exit 1 # file does not exist + [ ! -s src/poetry/$f ] && echo "# empty module" >> src/poetry/$f || exit 2 # file is not empty +done +%if !%{with test} %build %pyproject_wheel @@ -100,18 +103,19 @@ find poetry -name '*.py' -executable -print0 | xargs -0 chmod a-x %pyproject_install %python_clone -a %{buildroot}%{_bindir}/poetry %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif +%if %{with test} %check -# discussion of this section: gh#python-poetry/poetry#1645 -%{python_expand # a virtualenv is necessary +%{python_expand # pytest needs to be called from the virtualenv python interpreter gh#python-poetry/poetry#1645 virtualenv-%{$python_bin_suffix} --system-site-packages testenv-%{$python_bin_suffix} source testenv-%{$python_bin_suffix}/bin/activate export PYTHONPATH="%{buildroot}%{$python_sitelib}" export PYTHONDONTWRITEBYTECODE=1 -# pytest needs to be called from the virtualenv python interpreter -python -m pytest -v tests +python -m pytest -vvv -n auto deactivate } +%endif %post %python_install_alternative poetry @@ -119,11 +123,13 @@ deactivate %postun %python_uninstall_alternative poetry +%if !%{with test} %files %{python_files} %doc README.md CHANGELOG.md %license LICENSE %{python_sitelib}/poetry %{python_sitelib}/poetry-%{version}*-info %python_alternative %{_bindir}/poetry +%endif %changelog