From cd821b8dc39c5dc11aa3036e6169eb48f4f3aac939aa62f56db231bda53561ab Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 10 Nov 2020 12:57:57 +0000 Subject: [PATCH] Accepting request 847489 from home:mcepl:branches:devel:languages:python - Add wheel subpackage with the generated wheel for this package. OBS-URL: https://build.opensuse.org/request/show/847489 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=201 --- python-setuptools.changes | 5 +++++ python-setuptools.spec | 30 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/python-setuptools.changes b/python-setuptools.changes index 9c36e5c..db0a5c3 100644 --- a/python-setuptools.changes +++ b/python-setuptools.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 10 09:21:02 UTC 2020 - Matej Cepl + +- Add wheel subpackage with the generated wheel for this package. + ------------------------------------------------------------------- Thu Aug 13 11:03:41 UTC 2020 - Ondřej Súkup diff --git a/python-setuptools.spec b/python-setuptools.spec index 70168b2..e14d8f4 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -22,9 +22,11 @@ %if "%{flavor}" == "test" %define psuffix -test %bcond_without test +%bcond_with wheel %else %define psuffix %{nil} %bcond_with test +%bcond_without wheel %endif %bcond_without python2 Name: python-setuptools%{psuffix} @@ -32,6 +34,7 @@ Version: 44.1.1 Release: 0 Summary: Enhancements to distutils for building and distributing Python packages License: MIT +Group: Development/Languages/Python URL: https://github.com/pypa/setuptools Source: https://files.pythonhosted.org/packages/source/s/setuptools/setuptools-%{version}.zip Source3: testdata.tar.gz @@ -80,6 +83,9 @@ Recommends: ca-certificates-mozilla Provides: %{oldpython}-distribute = %{version} Obsoletes: %{oldpython}-distribute < %{version} %endif +%if %{with wheel} +BuildRequires: %{python_module wheel} +%endif %python_subpackages %description @@ -87,6 +93,16 @@ setuptools is a collection of enhancements to the Python distutils that allow you to build and distribute Python packages, especially ones that have dependencies on other packages. +%if %{with wheel} +%package wheel +Summary: Wheels for %{name} +Group: Development/Languages/Python +BuildArch: noarch + +%description wheel +Generated wheels for %{name}. +%endif + %prep %setup -q -n setuptools-%{version} tar -xzvf %{SOURCE3} @@ -122,11 +138,19 @@ find ./ -type f -name \*.py -exec sed -i \ %build %python_build +%if %{with wheel} +%python_exec setup.py bdist_wheel --universal +%endif %install %if !%{with test} %python_install %prepare_alternative easy_install + +%if %{with wheel} +%python_expand install -D -m 0644 -t %{buildroot}%{$python_sitelib}/../wheels dist/*.whl +%endif + %python_expand %fdupes %{buildroot}%{$python_sitelib} %endif @@ -159,4 +183,10 @@ export PYTHONPATH=$(pwd) %{python_sitelib}/pkg_resources/* %endif +%if %{with wheel} +%files %{python_files wheel} +%dir %{python_sitelib}/../wheels +%{python_sitelib}/../wheels/* +%endif + %changelog