Skip to content

Commit

Permalink
Update RPM .spec file to use Python 2 on EL7. HTCONDOR-549
Browse files Browse the repository at this point in the history
Remove Python 3 requirements. Rewrite .py shebang lines to use python2.
  • Loading branch information
JaimeFrey committed Jul 27, 2021
1 parent 78c768d commit 621debc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rpm/blahp.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
%define bl_libexecdir %{_libexecdir}/%{name}

# Force brp-python-bytecompile to use Python 3
%if ! 0%{?rhel} == 7
%global __python /usr/bin/python3
%endif

Name: blahp
Version: 2.1.0
Expand All @@ -31,7 +33,9 @@ BuildRequires: globus-gsi-proxy-core-devel
BuildRequires: globus-gsi-cert-utils-devel
BuildRequires: docbook-style-xsl, libxslt

%if ! 0%{?rhel} == 7
Requires: python3
%endif

%description
%{summary}
Expand All @@ -40,6 +44,10 @@ Requires: python3
%setup

%build
%if 0%{?rhel} == 7
# Don't rely on Python 3 on EL7 (not installed by default)
sed -i 's;/usr/bin/python3;/usr/bin/python2;' src/scripts/*status.py
%endif
./bootstrap
export CPPFLAGS="-I/usr/include/classad -std=c++11 -fcommon"
export LDFLAGS="-lclassad -lglobus_gsi_credential -lglobus_common -lglobus_gsi_proxy_core"
Expand Down

0 comments on commit 621debc

Please sign in to comment.