scl-utils/0001-Replace-__python-with-__python3.patch
2021-07-23 09:14:04 +02:00

32 lines
1.0 KiB
Diff

From 56e77e7ec51ac610b5cc263bd2de058714bbd3e8 Mon Sep 17 00:00:00 2001
From: Jun Aruga <jaruga@redhat.com>
Date: Mon, 21 Dec 2020 13:41:40 +0100
Subject: [PATCH] Replace %{__python} with %{__python3}.
To fix the following error.
```
$ rhpkg srpm
error: attempt to use unversioned python, define %__python to /usr/bin/python2 or /usr/bin/python3 explicitly
```
---
rpm/macros.scl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rpm/macros.scl b/rpm/macros.scl
index 550243e..f1ee5f2 100644
--- a/rpm/macros.scl
+++ b/rpm/macros.scl
@@ -90,7 +90,7 @@ package or when debugging this package.
/usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump}
}
/usr/lib/rpm/brp-strip-static-archive %{__strip}
- /usr/lib/rpm/brp-scl-python-bytecompile %{__python} %{?_python_bytecompile_errors_terminate_build} %{_scl_root}
+ /usr/lib/rpm/brp-scl-python-bytecompile %{__python3} %{?_python_bytecompile_errors_terminate_build} %{_scl_root}
/usr/lib/rpm/brp-python-hardlink
%{nil}}
BuildRequires: scl-utils-build
--
2.26.3