File saltbundlepy-rpm-macros.spec of Package saltbundlepy-rpm-macros

# spec file for package saltbundlepy-rpm-macros
# Copyright (c) 2021 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           saltbundlepy-rpm-macros
Version:        20211001.fc6c04e
Release:        0
Summary:        RPM macros for building of Python modules
License:        WTFPL
Source:         saltbundlepy-rpm-macros-%{version}.tar.xz
Patch0:         specfile.patch
Patch1:         saltbundlepy-flavor.patch
BuildArch:      noarch

This package contains SUSE RPM macros for Python build automation.
You should BuildRequire this package unless you are sure that you
are only building for distros newer than Leap 42.2

%package -n saltbundlepy-rpm-generators
Summary:        Dependency generator dependencies for Python RPMs
Requires:       %{name} = %{version}-%{release}
# For the dep generator macros
Requires:       saltbundlepy-setuptools

%description -n saltbundlepy-rpm-generators
This package contains the dependencies for Python RPMs to generate
dependencies automatically.

%autosetup -p1

sed -i -e '/^%system_python/s/python2/python3/' macros/010-common-defs


sed -i -e '/^%__saltbundlepy/s/%%{_bindir}.*/%%{_bindir}\/python3.9/' macros.python_all

mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/
install -m 644 macros.python_all %{buildroot}%{_rpmconfigdir}/macros.d/macros.saltbundlepy

%license LICENSE

%files -n saltbundlepy-rpm-generators
# Nothing here for now...

openSUSE Build Service is sponsored by