Spec: Expand %srcname for easier readability

epel9
Miro Hrončok 2 years ago
parent 3449703bd8
commit 42ec117fa7

@ -9,9 +9,7 @@
%bcond tests %[%{without bootstrap} && ! %[%{defined rhel} && %{undefined epel}]] %bcond tests %[%{without bootstrap} && ! %[%{defined rhel} && %{undefined epel}]]
%global srcname flit Name: python-flit
Name: python-%{srcname}
Version: 3.8.0 Version: 3.8.0
Release: 2%{?dist} Release: 2%{?dist}
Summary: Simplified packaging of Python modules Summary: Simplified packaging of Python modules
@ -21,7 +19,7 @@ Summary: Simplified packaging of Python modules
License: BSD and ASL 2.0 and Python License: BSD and ASL 2.0 and Python
URL: https://flit.readthedocs.io/en/latest/ URL: https://flit.readthedocs.io/en/latest/
Source0: https://github.com/takluyver/flit/archive/%{version}/%{srcname}-%{version}.tar.gz Source0: https://github.com/takluyver/flit/archive/%{version}/flit-%{version}.tar.gz
# For the tests # For the tests
Source1: https://pypi.org/pypi?%3Aaction=list_classifiers#/classifiers.lst Source1: https://pypi.org/pypi?%3Aaction=list_classifiers#/classifiers.lst
@ -68,9 +66,9 @@ so long as they can be imported on Python 3.}
%if %{without bootstrap} %if %{without bootstrap}
%package -n python3-%{srcname} %package -n python3-flit
Summary: %{summary} Summary: %{summary}
Requires: python3-%{srcname}-core = %{version}-%{release} Requires: python3-flit-core = %{version}-%{release}
# https://pypi.python.org/pypi/tornado # https://pypi.python.org/pypi/tornado
# ./flit/log.py unknown version # ./flit/log.py unknown version
@ -79,13 +77,13 @@ Provides: bundled(python3dist(tornado))
# soft dependency: (WARNING) Cannot analyze code. Pygments package not found. # soft dependency: (WARNING) Cannot analyze code. Pygments package not found.
Recommends: python3-pygments Recommends: python3-pygments
%description -n python3-%{srcname} %_description %description -n python3-flit %_description
%endif %endif
%package -n python3-%{srcname}-core %package -n python3-flit-core
Summary: PEP 517 build backend for packages using Flit Summary: PEP 517 build backend for packages using Flit
Conflicts: python3-%{srcname} < 2.1.0-2 Conflicts: python3-flit < 2.1.0-2
# RPM generators are not yet available when we bootstrap # RPM generators are not yet available when we bootstrap
%if %{with bootstrap} %if %{with bootstrap}
@ -94,14 +92,14 @@ Provides: python%{python3_version}dist(flit-core) = %{version}
Requires: python(abi) = %{python3_version} Requires: python(abi) = %{python3_version}
%endif %endif
%description -n python3-%{srcname}-core %description -n python3-flit-core
This provides a PEP 517 build backend for packages using Flit. This provides a PEP 517 build backend for packages using Flit.
The only public interface is the API specified by PEP 517, The only public interface is the API specified by PEP 517,
at flit_core.buildapi. at flit_core.buildapi.
%prep %prep
%autosetup -p1 -n %{srcname}-%{version} %autosetup -p1 -n flit-%{version}
# Remove vendored tomli that flit_core includes to solve the circular dependency on older Pythons # Remove vendored tomli that flit_core includes to solve the circular dependency on older Pythons
# (flit_core requires tomli, but flit_core is needed to build tomli). # (flit_core requires tomli, but flit_core is needed to build tomli).
@ -152,7 +150,7 @@ export XDG_CACHE_HOME=$PWD/fake_cache
%if %{without bootstrap} %if %{without bootstrap}
%files -n python3-%{srcname} %files -n python3-flit
%license LICENSE %license LICENSE
%doc README.rst %doc README.rst
%{python3_sitelib}/flit-*.dist-info/ %{python3_sitelib}/flit-*.dist-info/
@ -161,7 +159,7 @@ export XDG_CACHE_HOME=$PWD/fake_cache
%endif %endif
%files -n python3-%{srcname}-core %files -n python3-flit-core
%license LICENSE %license LICENSE
%doc flit_core/README.rst %doc flit_core/README.rst
%{python3_sitelib}/flit_core-*.dist-info/ %{python3_sitelib}/flit_core-*.dist-info/

Loading…
Cancel
Save