spec: Remove %{srcname} variable

It just expands to "lit". The variable was only used 4 times while the
literal "lit" was used 8 times.
This commit is contained in:
Timm Bäder 2022-03-02 09:04:13 +01:00
parent dd0af2da22
commit 2b363131e5

View File

@ -1,13 +1,10 @@
%global srcname lit
%global lit_version 13.0.1 %global lit_version 13.0.1
#global rc_ver 1 #global rc_ver 1
#%%global post_ver 1 #%%global post_ver 1
%bcond_without check %bcond_without check
Name: python-%{srcname} Name: python-lit
Version: %{lit_version}%{?rc_ver:~rc%{rc_ver}} Version: %{lit_version}%{?rc_ver:~rc%{rc_ver}}
Release: 1%{?dist} Release: 1%{?dist}
BuildArch: noarch BuildArch: noarch
@ -15,7 +12,7 @@ BuildArch: noarch
License: NCSA License: NCSA
Summary: Tool for executing llvm test suites Summary: Tool for executing llvm test suites
URL: https://pypi.python.org/pypi/lit URL: https://pypi.python.org/pypi/lit
Source0: %{pypi_source %{srcname} %{lit_version}%{?rc_ver:rc%{rc_ver}}%{?post_ver:.post%{post_ver}}} Source0: %{pypi_source lit %{lit_version}%{?rc_ver:rc%{rc_ver}}%{?post_ver:.post%{post_ver}}}
# for file check # for file check
%if %{with check} %if %{with check}
@ -37,7 +34,7 @@ Requires: python3-setuptools
lit is a tool used by the LLVM project for executing its test suites. lit is a tool used by the LLVM project for executing its test suites.
%prep %prep
%autosetup -n %{srcname}-%{lit_version}%{?rc_ver:rc%{rc_ver}}%{?post_ver:.post%{post_ver}} -p4 %autosetup -n lit-%{lit_version}%{?rc_ver:rc%{rc_ver}}%{?post_ver:.post%{post_ver}} -p4
%build %build
%py3_build %py3_build
@ -46,14 +43,14 @@ lit is a tool used by the LLVM project for executing its test suites.
%py3_install %py3_install
# Strip out #!/usr/bin/env python # Strip out #!/usr/bin/env python
sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/%{srcname}/*.py sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/lit/*.py
%if %{with check} %if %{with check}
%check %check
%{__python3} lit.py tests %{__python3} lit.py tests
%endif %endif
%files -n python3-%{srcname} %files -n python3-lit
%license LICENSE.TXT %license LICENSE.TXT
%doc README.txt %doc README.txt
%{python3_sitelib}/* %{python3_sitelib}/*