check_patroni: Add missing macro
authorDevrim Gunduz <devrim@gunduz.org>
Mon, 14 Apr 2025 06:40:45 +0000 (09:40 +0300)
committerDevrim Gunduz <devrim@gunduz.org>
Mon, 14 Apr 2025 06:40:45 +0000 (09:40 +0300)
rpm/redhat/main/common/check_patroni/main/check_patroni.spec

index 56df591ae00bbc9c69dd6279f8b13c55443ac47f..66f6d5d1b1fcc3017362752abad26a0f1c64e78f 100644 (file)
@@ -1,3 +1,9 @@
+%if 0%{?fedora} >= 40 || 0%{?rhel} >= 10
+%{expand: %%global py3ver %(echo `%{__python3} -c "import sys; sys.stdout.write(sys.version[:4])"`)}
+%else
+%{expand: %%global py3ver %(echo `%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])"`)}
+%endif
+
 %global sname check_patroni
 
 Name:          nagios-plugins-patroni