public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/tito] epel10: Correct and make less confusing the conditional Python macros
@ 2026-10-30 12:57 Adam Williamson
0 siblings, 0 replies; only message in thread
From: Adam Williamson @ 2026-10-30 12:57 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/tito
Branch : epel10
Commit : 0190b5f578ced759db09555fc06c148968343be7
Author : Adam Williamson <awilliam@redhat.com>
Date : 2019-01-18T10:10:49-08:00
Stats : +14/-14 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/tito/c/0190b5f578ced759db09555fc06c148968343be7?branch=epel10
Log:
Correct and make less confusing the conditional Python macros
This was using 'python_sitelib' in a non-standard way (it got
defined to either python2_sitelib or python3_sitelib depending
on whether we're doing a python2 or python3 build). Igor saw
the uses of 'python_sitelib' and assumed it was just using the
old name for 'the python 2 sitelib' and changed them all to
'python2_sitelib'...which broke all Fedora builds.
This fixes that problem and renames the package's confusing
'python_sitelib' and 'pythonbin' so hopefully no-one will make
the same mistake in future.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
diff --git a/tito.spec b/tito.spec
index 396285e..c7ef6cb 100644
--- a/tito.spec
+++ b/tito.spec
@@ -1,20 +1,20 @@
%if 0%{?fedora}
%global use_python3 1
%global use_python2 0
-%global pythonbin %{__python3}
-%global python_sitelib %{python3_sitelib}
+%global ourpythonbin %{__python3}
+%global our_sitelib %{python3_sitelib}
%else
%global use_python3 0
%global use_python2 1
%if 0%{?__python2:1}
-%global pythonbin %{__python2}
-%global python_sitelib %{python2_sitelib}
+%global ourpythonbin %{__python2}
+%global our_sitelib %{python2_sitelib}
%else
-%global pythonbin %{__python}
-%global python_sitelib %{python_sitelib}
+%global ourpythonbin %{__python}
+%global our_sitelib %{our_sitelib}
%endif
%endif
-%{!?python_sitelib: %define python_sitelib %(%{pythonbin} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%{!?our_sitelib: %define our_sitelib %(%{ourpythonbin} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Name: tito
Version: 0.6.11
@@ -77,10 +77,10 @@ git.
%prep
%setup -q -n tito-%{version}
-sed -i 1"s|#!.*|#!%{pythonbin}|" bin/tito
+sed -i 1"s|#!.*|#!%{ourpythonbin}|" bin/tito
%build
-%{pythonbin} setup.py build
+%{ourpythonbin} setup.py build
# convert manages
a2x -d manpage -f manpage titorc.5.asciidoc
a2x -d manpage -f manpage tito.8.asciidoc
@@ -89,8 +89,8 @@ a2x -d manpage -f manpage releasers.conf.5.asciidoc
%install
rm -rf $RPM_BUILD_ROOT
-%{pythonbin} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
-rm -f $RPM_BUILD_ROOT%{python_sitelib}/*egg-info/requires.txt
+%{ourpythonbin} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+rm -f $RPM_BUILD_ROOT%{our_sitelib}/*egg-info/requires.txt
# manpages
%{__mkdir_p} %{buildroot}%{_mandir}/man5
%{__mkdir_p} %{buildroot}%{_mandir}/man8
@@ -110,9 +110,9 @@ install -Dp -m 0644 share/tito_completion.sh %{buildroot}%{_datadir}/bash-comple
%{_bindir}/tito
%{_bindir}/generate-patches.pl
%{_datadir}/bash-completion/completions/tito
-%dir %{python_sitelib}/tito
-%{python2_sitelib}/tito/*
-%{python2_sitelib}/tito-*.egg-info
+%dir %{our_sitelib}/tito
+%{our_sitelib}/tito/*
+%{our_sitelib}/tito-*.egg-info
%changelog
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-30 12:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-30 12:57 [rpms/tito] epel10: Correct and make less confusing the conditional Python macros Adam Williamson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox