From e29527b47b61a09635bf9e746a866a58ff0392c1a21989d9b3d929c8d6ee04ce Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 2 Sep 2020 11:46:53 +0000 Subject: [PATCH] - Add patch multiple_flavors.patch which makes compile_macros.sh generate alternative flavours as well. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python-rpm-macros?expand=0&rev=107 --- multiple_flavors.patch | 15 +++++++++++++++ python-rpm-macros.changes | 6 ++++++ python-rpm-macros.spec | 13 ++++++++----- 3 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 multiple_flavors.patch diff --git a/multiple_flavors.patch b/multiple_flavors.patch new file mode 100644 index 0000000..18dc1a6 --- /dev/null +++ b/multiple_flavors.patch @@ -0,0 +1,15 @@ +--- a/compile-macros.sh ++++ b/compile-macros.sh +@@ -1,10 +1,10 @@ + #!/bin/bash + +-FLAVORS="python2 python3 pypy3" ++FLAVORS="python2 python3 python36 python38 pypy3" + + # order of BUILDSET is important, it is copied to order of %pythons, + # and that determines the last installed binary +-BUILDSET="python2 python3" ++BUILDSET="python2 python36 python38" + + + ### flavor-specific: generate from flavor.in diff --git a/python-rpm-macros.changes b/python-rpm-macros.changes index 8e0679d..cbb54a8 100644 --- a/python-rpm-macros.changes +++ b/python-rpm-macros.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 2 11:44:33 UTC 2020 - Matej Cepl + +- Add patch multiple_flavors.patch which makes compile_macros.sh + generate alternative flavours as well. + ------------------------------------------------------------------- Mon Aug 24 08:09:01 UTC 2020 - mcepl@cepl.eu diff --git a/python-rpm-macros.spec b/python-rpm-macros.spec index 29108fc..1726c2d 100644 --- a/python-rpm-macros.spec +++ b/python-rpm-macros.spec @@ -23,11 +23,14 @@ Summary: RPM macros for building of Python modules License: WTFPL URL: https://github.com/opensuse/python-rpm-macros Source: python-rpm-macros-%{version}.tar.xz +# PATCH-FEATURE-OPENSUSE multiple_flavors.patch mcepl@suse.com +# make work with multiple python3 flavours. +Patch0: multiple_flavors.patch +# To keep user expectations reasonably sane +Recommends: python-rpm-generators # Fedora compatibility Provides: python2-rpm-macros Provides: python3-rpm-macros -# To keep user expectations reasonably sane -Recommends: python-rpm-generators BuildArch: noarch %description @@ -38,10 +41,10 @@ are only building for distros newer than Leap 42.2 %package -n python-rpm-generators Summary: Dependency generator dependencies for Python RPMs Requires: %{name} = %{version}-%{release} -# Fedora compatibility -Provides: python3-rpm-generators # For the dep generator macros Requires: python3-setuptools +# Fedora compatibility +Provides: python3-rpm-generators %description -n python-rpm-generators This package contains the dependencies for Python RPMs to generate @@ -55,7 +58,7 @@ dependencies automatically. mv macros-default-pythons macros/035-default-pythons %endif %if 0%{?suse_version} >= 1550 -sed -i -e '/^%system_python/s/python2/python3/' macros/010-common-defs +sed -i -e '/^%{system_python}/s/python2/python3/' macros/010-common-defs %endif %build