From 1ede3fffefc2997941b4bf79c4ef97276cc380a840cf8d2f79eca384b417f63f Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 18 Jun 2021 19:35:18 +0000 Subject: [PATCH] Accepting request 900809 from home:bnavigator:branches:devel:languages:python - Add python dist provides for setuptools, pkg_resources and easy_install: work around boo#1186870 - Dont create a package for -test flavor OBS-URL: https://build.opensuse.org/request/show/900809 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=215 --- python-setuptools.changes | 7 +++++++ python-setuptools.spec | 21 ++++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/python-setuptools.changes b/python-setuptools.changes index 77d1033..94b941f 100644 --- a/python-setuptools.changes +++ b/python-setuptools.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jun 17 17:03:46 UTC 2021 - Ben Greiner + +- Add python dist provides for setuptools, pkg_resources and + easy_install: work around boo#1186870 +- Dont create a package for -test flavor + ------------------------------------------------------------------- Fri Jan 22 19:05:02 UTC 2021 - Matej Cepl diff --git a/python-setuptools.spec b/python-setuptools.spec index 65e8ba4..c1f11e5 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -1,5 +1,5 @@ # -# spec file for package python-setuptools +# spec file # # Copyright (c) 2021 SUSE LLC # @@ -34,6 +34,8 @@ %endif %endif %bcond_without python2 +# in order to avoid rewriting for subpackage generator +%define mypython python Name: python-setuptools%{psuffix} Version: 44.1.1 Release: 0 @@ -63,7 +65,7 @@ Requires: python-packaging Requires: python-six Requires: python-xml Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires(postun):update-alternatives BuildArch: noarch # The dependency download feature may require SSL, which is in python3-base and python(2) %ifpython2 @@ -92,6 +94,17 @@ Obsoletes: %{oldpython}-distribute < %{version} %if %{with wheel} BuildRequires: %{python_module wheel} %endif +%if !%{with test} && !%{with wheel} +# work around boo#1186870 +Provides: %{mypython}%{python_version}dist(setuptools) = %{version} +Provides: %{mypython}%{python_version}dist(easy_install) = %{version} +Provides: %{mypython}%{python_version}dist(pkg_resources) = %{version} +%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3" +Provides: %{mypython}3dist(easy_install) = %{version} +Provides: %{mypython}3dist(pkg_resources) = %{version} +Provides: %{mypython}3dist(setuptools) = %{version} +%endif +%endif %python_subpackages %description @@ -172,8 +185,9 @@ export PYTHONPATH=$(pwd) %python_uninstall_alternative easy_install %endif +%if !%{with test} %files %{python_files} -%if !%{with test} && !%{with wheel} +%if !%{with wheel} %license LICENSE %doc CHANGES.rst README.rst %python_alternative %{_bindir}/easy_install @@ -189,5 +203,6 @@ export PYTHONPATH=$(pwd) %dir %{python_sitelib}/../wheels %{python_sitelib}/../wheels/* %endif +%endif %changelog