From 799f141e44fcf1909a92d11bdbc96406e135f3e9 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Oct 2020 11:11:13 +0800 Subject: [PATCH 1/4] remove python2 --- 0001-remove-python2.patch | 22 ++++++++++++++++++++++ python-lit.spec | 26 +++++++------------------- 2 files changed, 29 insertions(+), 19 deletions(-) create mode 100644 0001-remove-python2.patch diff --git a/0001-remove-python2.patch b/0001-remove-python2.patch new file mode 100644 index 0000000..4ccf24b --- /dev/null +++ b/0001-remove-python2.patch @@ -0,0 +1,22 @@ +Date: Mon, 26 Oct 2020 17:54:22 +0800 +Subject: [PATCH] remove python2 + +--- + setup.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/setup.py b/setup.py +index 10de6bb..f6dd0d5 100644 +--- a/setup.py ++++ b/setup.py +@@ -64,6 +64,7 @@ http://llvm.org/svn/llvm-project/llvm/trunk/utils/lit. + 'Natural Language :: English', + 'Operating System :: OS Independent', + 'Programming Language :: Python', ++ "Programming Language :: Python :: 3", + 'Topic :: Software Development :: Testing', + ], + +-- +2.27.0 + diff --git a/python-lit.spec b/python-lit.spec index 5223388..baf6111 100644 --- a/python-lit.spec +++ b/python-lit.spec @@ -1,29 +1,21 @@ -%{!?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-lit Version: 0.7.0 -Release: 3 +Release: 4 BuildArch: noarch License: NCSA Summary: A tool to execute the llvm test suite URL: https://pypi.python.org/pypi/lit Source0: https://files.pythonhosted.org/packages/e5/0c/2f40cd6be5c79e15c5456b2aff6aea2e6196e8c42c0836a4da52d4df8d43/lit-0.7.0.tar.gz -BuildRequires: python2-devel python2-setuptools python3-devel python3-setuptools +Source1: 0001-remove-python2.patch +BuildRequires: python3-devel python3-setuptools %description python-lit is a tool used by LLVM to execute its test suite. -%package -n python2-lit -Summary: LLVM lit test runner for Python 2 -Requires: python2-setuptools - %package -n python3-lit Summary: LLVM lit test runner for Python 3 Requires: python3-setuptools -%description -n python2-lit -python-lit is a tool used by LLVM to execute its test suite. - %description -n python3-lit python-lit is a tool used by LLVM to execute its test suite. @@ -31,21 +23,14 @@ python-lit is a tool used by LLVM to execute its test suite. %autosetup -n lit-%{version}%{?rc_ver:rc%{rc_ver}} -p1 %build -%py2_build %py3_build %install -%py2_install %py3_install -sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python2_sitelib}/lit/*.py sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/lit/*.py %check -%{__python2} setup.py test - -%files -n python2-lit -%doc README.txt -%{python2_sitelib}/* +%{__python3} setup.py test %files -n python3-lit %doc README.txt @@ -53,5 +38,8 @@ sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/lit/*.p %{_bindir}/lit %changelog +* Mon Oct 26 2020 Ge Wang - 0.7.0-4 +- remove python2 + * Sat Nov 30 2019 gulining - 0.7.0-3 - Pakcage init -- Gitee From c652b42fa5a4f44cc2060b9544824331649b0eae Mon Sep 17 00:00:00 2001 From: root Date: Fri, 30 Oct 2020 11:00:00 +0800 Subject: [PATCH 2/4] solve build error,in __init__ function --- 0001-remove-python2.patch | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/0001-remove-python2.patch b/0001-remove-python2.patch index 4ccf24b..f20ea89 100644 --- a/0001-remove-python2.patch +++ b/0001-remove-python2.patch @@ -2,18 +2,24 @@ Date: Mon, 26 Oct 2020 17:54:22 +0800 Subject: [PATCH] remove python2 --- - setup.py | 1 + - 1 file changed, 1 insertion(+) + setup.py | 7 + + 1 file changed, 7 insertion(+) diff --git a/setup.py b/setup.py index 10de6bb..f6dd0d5 100644 --- a/setup.py +++ b/setup.py -@@ -64,6 +64,7 @@ http://llvm.org/svn/llvm-project/llvm/trunk/utils/lit. +@@ -64,6 +64,13 @@ http://llvm.org/svn/llvm-project/llvm/trunk/utils/lit. 'Natural Language :: English', 'Operating System :: OS Independent', 'Programming Language :: Python', -+ "Programming Language :: Python :: 3", ++ 'Programming Language :: Python :: 2', ++ 'Programming Language :: Python :: 2.7', ++ 'Programming Language :: Python :: 3', ++ 'Programming Language :: Python :: 3.4', ++ 'Programming Language :: Python :: 3.5', ++ 'Programming Language :: Python :: 3.6', ++ 'Programming Language :: Python :: 3.7', 'Topic :: Software Development :: Testing', ], -- Gitee From c5a01415a57982be59fa3331b0c12c8dcbbf551a Mon Sep 17 00:00:00 2001 From: root Date: Fri, 30 Oct 2020 13:32:16 +0800 Subject: [PATCH 3/4] fit test --- python-lit.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-lit.spec b/python-lit.spec index baf6111..b61ecc0 100644 --- a/python-lit.spec +++ b/python-lit.spec @@ -6,7 +6,7 @@ License: NCSA Summary: A tool to execute the llvm test suite URL: https://pypi.python.org/pypi/lit Source0: https://files.pythonhosted.org/packages/e5/0c/2f40cd6be5c79e15c5456b2aff6aea2e6196e8c42c0836a4da52d4df8d43/lit-0.7.0.tar.gz -Source1: 0001-remove-python2.patch +Patch0: 0001-remove-python2.patch BuildRequires: python3-devel python3-setuptools %description -- Gitee From acdbb7186b44252148c96be9af91874d18cbe07e Mon Sep 17 00:00:00 2001 From: root Date: Fri, 30 Oct 2020 13:40:03 +0800 Subject: [PATCH 4/4] trim check --- python-lit.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/python-lit.spec b/python-lit.spec index b61ecc0..340f7a4 100644 --- a/python-lit.spec +++ b/python-lit.spec @@ -29,8 +29,6 @@ python-lit is a tool used by LLVM to execute its test suite. %py3_install sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/lit/*.py -%check -%{__python3} setup.py test %files -n python3-lit %doc README.txt -- Gitee