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 rc_ver 1
#%%global post_ver 1
%bcond_without check
Name: python-%{srcname}
Name: python-lit
Version: %{lit_version}%{?rc_ver:~rc%{rc_ver}}
Release: 1%{?dist}
BuildArch: noarch
@ -15,7 +12,7 @@ BuildArch: noarch
License: NCSA
Summary: Tool for executing llvm test suites
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
%if %{with check}
@ -37,7 +34,7 @@ Requires: python3-setuptools
lit is a tool used by the LLVM project for executing its test suites.
%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
%py3_build
@ -46,14 +43,14 @@ lit is a tool used by the LLVM project for executing its test suites.
%py3_install
# 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}
%check
%{__python3} lit.py tests
%endif
%files -n python3-%{srcname}
%files -n python3-lit
%license LICENSE.TXT
%doc README.txt
%{python3_sitelib}/*