commit 01133c3f66be70bcb4a86fc7cb7596da127d7b7f Author: CentOS Sources Date: Wed May 27 20:31:40 2020 +0000 import python-lit-0.10.0-1.module+el8.3.0+6367+3467b552 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ffcea24 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/lit-0.10.0.tar.gz diff --git a/.python-lit.metadata b/.python-lit.metadata new file mode 100644 index 0000000..908fb17 --- /dev/null +++ b/.python-lit.metadata @@ -0,0 +1 @@ +b1c31b0e5bc1d6c9dc4969362caf91dbfaed23c4 SOURCES/lit-0.10.0.tar.gz diff --git a/SOURCES/version.patch b/SOURCES/version.patch new file mode 100644 index 0000000..179c004 --- /dev/null +++ b/SOURCES/version.patch @@ -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]*}} + diff --git a/SPECS/python-lit.spec b/SPECS/python-lit.spec new file mode 100644 index 0000000..1aa70f9 --- /dev/null +++ b/SPECS/python-lit.spec @@ -0,0 +1,174 @@ +%global srcname lit + +%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.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/e7/56/7967ff7ea510c12a4f3d5f6582a416ff74bd6b1194be265c979df6701c56/lit-0.10.0.tar.gz + +Patch0: version.patch + +# for file check +%if %{with check} +BuildRequires: llvm-test +%endif + +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. + +%package -n python3-lit +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}} -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 - 0.9.0-1 +- 0.9.0 Release + +* Wed Apr 17 2019 sguelton@redhat.com - 0.8.0-1 +- 0.8.0 Release + +* Fri Dec 14 2018 Tom Stellard - 0.7.1-1 +- 0.7.1 Release + +* Tue Nov 27 2018 Tom Stellard - 0.7.0-1 +- 0.7.0 Release + +* Fri Nov 16 2018 Lumír Balhar - 0.6.0-6 +- Require platform-python-setuptools instead of python3-setuptools +- Resolves: rhbz#1650540 + +* Mon Oct 01 2018 Tom Stellard - 0.6.0-5 +- Drop SCL macros + +* Wed Sep 12 2018 Tom Stellard - 0.6.0-4 +- Use versioned python dependencies (python3) + +* Mon Aug 27 2018 Tom Stellard - 0.6.0-3 +- Fix python3 install + +* Mon Aug 27 2018 Tom Stellard - 0.6.0-2 +- Enable python3 + +* Tue Jul 10 2018 Tom Stellrad - 0.6.0-1 +- 0.6.0 Release + +* Mon Jul 02 2018 Tom Stellard - 0.5.1-4 +- Drop python2 + +* Tue Jun 12 2018 Tom Stellard - 0.5.1-3 +- Add BuildRequires: scl-utils-build + +* Thu Jan 11 2018 Tom Stellard - 0.5.1-2 +- Fix build on RHEL8 + +* Tue Jan 09 2018 Tom Stellard - 0.5.1-1 +- Rebase to 0.5.1 + +* Thu Jun 08 2017 Tom Stellard - 0.5.0-7 +- Build for llvm-toolset-7 rename + +* Thu May 18 2017 Tom Stellard - 0.5.0-6 +- Fix package names + +* Wed May 10 2017 Tilmann Scheller - 0.5.0-5 +- Next attempt to add runtime dependency on python-setuptools + +* Tue May 09 2017 Tilmann Scheller - 0.5.0-4 +- Properly add missing runtime dependency to python-setuptools + +* Tue May 09 2017 Tilmann Scheller - 0.5.0-3 +- Add missing runtime dependency to python-setuptools + +* Fri Apr 28 2017 Tom Stellard - 0.5.0-2 +- Add llvm-toolset-4 scl support + +* Thu Mar 09 2017 Tom Stellard - 0.5.0-1 +- Initial version