From 7bc135db0aabce0593e4ab9ae54fcce3a3f408d2 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Thu, 21 Oct 2021 10:41:32 +0200 Subject: [PATCH] Remove python 2 support --- python-lit.spec | 52 ++++--------------------------------------------- 1 file changed, 4 insertions(+), 48 deletions(-) diff --git a/python-lit.spec b/python-lit.spec index 9a18966..72d7dfa 100644 --- a/python-lit.spec +++ b/python-lit.spec @@ -1,10 +1,5 @@ %global srcname lit -%if 0%{?fedora} || 0%{?rhel} > 7 -%global with_python2 0 -%else -%global with_python2 1 -%endif %global lit_version 13.0.0 #global rc_ver 1 @@ -12,13 +7,9 @@ %bcond_without check -# FIXME: Work around for rhel not having py2_build/py2_install macro. -%{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}} -%{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}} - Name: python-%{srcname} Version: %{lit_version}%{?rc_ver:~rc%{rc_ver}} -Release: 1%{?dist} +Release: 2%{?dist} BuildArch: noarch License: NCSA @@ -33,10 +24,6 @@ BuildRequires: llvm-test BuildRequires: python3-devel BuildRequires: python3-setuptools -%if 0%{?with_python2} -BuildRequires: python2-devel -BuildRequires: python2-setuptools -%endif %description lit is a tool used by the LLVM project for executing its test suites. @@ -46,48 +33,24 @@ Summary: LLVM lit test runner for Python 3 Requires: python3-setuptools -%if 0%{?with_python2} -%package -n python2-lit -Summary: LLVM lit test runner for Python 2 - -Requires: python2-setuptools -%endif - %description -n python3-lit lit is a tool used by the LLVM project for executing its test suites. -%if 0%{?with_python2} -%description -n python2-lit -lit is a tool used by the LLVM project for executing its test suites. -%endif - %prep %autosetup -n %{srcname}-%{lit_version}%{?rc_ver:rc%{rc_ver}}%{?post_ver:.post%{post_ver}} -p4 %build %py3_build -%if 0%{?with_python2} -%py2_build -%endif %install %py3_install -%if 0%{?with_python2} -%py2_install -%endif # Strip out #!/usr/bin/env python sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/%{srcname}/*.py -%if 0%{?with_python2} -sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python2_sitelib}/%{srcname}/*.py -%endif %if %{with check} %check %{__python3} lit.py tests -%if 0%{?with_python2} -%{__python2} lit.py tests -%endif %endif %files -n python3-%{srcname} @@ -96,17 +59,10 @@ sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python2_sitelib}/%{srcna %{python3_sitelib}/* %{_bindir}/lit -%if 0%{?with_python2} -%files -n python2-%{srcname} -%license LICENSE.TXT -%doc README.txt -%{python2_sitelib}/* -%if %{undefined with_python2} -%{_bindir}/lit -%endif -%endif - %changelog +* Thu Oct 21 2021 Konrad Kleine - 13.0.0-2 +- Remove python 2 support + * Tue Oct 05 2021 Tom Stellard - 13.0.0-1 - 13.0.0 Release