import python-lit-0.10.0-1.module+el8.3.0+6367+3467b552

This commit is contained in:
CentOS Sources 2020-11-03 07:07:58 -05:00 committed by Andrew Lukoshko
parent 973de33e06
commit bba142ec1e
4 changed files with 105 additions and 7 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/lit-0.9.0.tar.gz
SOURCES/lit-0.10.0.tar.gz

View File

@ -1 +1 @@
4cf303b76203cef3d29b2194e1d59220d53a68d2 SOURCES/lit-0.9.0.tar.gz
b1c31b0e5bc1d6c9dc4969362caf91dbfaed23c4 SOURCES/lit-0.10.0.tar.gz

42
SOURCES/version.patch Normal file
View File

@ -0,0 +1,42 @@
diff --git a/llvm/utils/lit/lit/cl_arguments.py b/llvm/utils/lit/lit/cl_arguments.py
index bac2be2..402fadb 100644
--- a/llvm/utils/lit/lit/cl_arguments.py
+++ b/llvm/utils/lit/lit/cl_arguments.py
@@ -15,7 +15,9 @@ def parse_args():
parser.add_argument("--version",
dest="show_version",
help="Show version and exit",
- action="store_true")
+ version="lit " + lit.__version__,
+ action="version")
+
parser.add_argument("-j", "--threads", "--workers",
dest="workers",
metavar="N",
diff --git a/llvm/utils/lit/lit/main.py b/llvm/utils/lit/lit/main.py
index c58b06c..0f0c76b 100755
--- a/llvm/utils/lit/lit/main.py
+++ b/llvm/utils/lit/lit/main.py
@@ -21,10 +21,6 @@ import lit.util
def main(builtin_params={}):
opts = lit.cl_arguments.parse_args()
- if opts.show_version:
- print("lit %s" % lit.__version__)
- return
-
params = create_params(builtin_params, opts.user_params)
is_windows = platform.system() == 'Windows'
diff --git a/llvm/utils/lit/tests/version.py b/llvm/utils/lit/tests/version.py
new file mode 100644
index 0000000..6d1d0fc
--- /dev/null
+++ b/llvm/utils/lit/tests/version.py
@@ -0,0 +1,5 @@
+# Basic sanity check that --version works.
+#
+# RUN: %{lit} --version | FileCheck %s
+#
+# CHECK: lit {{[0-9]+\.[0-9]+\.[0-9]+[a-zA-Z0-9]*}}

View File

@ -1,17 +1,31 @@
%global srcname lit
#%%global rc_ver 4
%if 0%{?fedora} || 0%{?rhel} > 7
%global with_python2 0
%else
%global with_python2 1
%endif
#%%global rc_ver 1
%global baserelease 1
%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: 0.9.0
Release: 1%{?dist}
Version: 0.10.0
Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist}
BuildArch: noarch
License: NCSA
Summary: Tool for executing llvm test suites
URL: https://pypi.python.org/pypi/lit
Source0: https://files.pythonhosted.org/packages/11/96/79e3eb8508926bc47f8be4a371a310453beaa1eb8e6c94140d45c8029adf/lit-0.9.0.tar.gz
Source0: https://files.pythonhosted.org/packages/e7/56/7967ff7ea510c12a4f3d5f6582a416ff74bd6b1194be265c979df6701c56/lit-0.10.0.tar.gz
Patch0: version.patch
# for file check
%if %{with check}
@ -20,6 +34,10 @@ 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.
@ -29,30 +47,68 @@ 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}-%{version}%{?rc_ver:rc%{rc_ver}}
%autosetup -n %{srcname}-%{version}%{?rc_ver:rc%{rc_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}
%doc README.txt
%{python3_sitelib}/*
%{_bindir}/lit
%if 0%{?with_python2}
%files -n python2-%{srcname}
%doc README.txt
%{python2_sitelib}/*
%if %{undefined with_python2}
%{_bindir}/lit
%endif
%endif
%changelog
* Thu Apr 9 2020 sguelton@redhat.com - 0.10.0-1
- 0.10.0 final release
* Fri Sep 27 2019 Tom Stellard <tstellar@redhat.com> - 0.9.0-1
- 0.9.0 Release