Reduce macro indirection in the spec file

This commit is contained in:
Benjamin A. Beasley 2021-09-12 12:28:00 -04:00
parent 62fe262168
commit 0de6333609

View File

@ -1,6 +1,4 @@
%global srcname pyrsistent Name: python-pyrsistent
Name: python-%{srcname}
Summary: Persistent/Functional/Immutable data structures Summary: Persistent/Functional/Immutable data structures
Version: 0.18.0 Version: 0.18.0
Release: %autorelease Release: %autorelease
@ -8,7 +6,7 @@ Release: %autorelease
# The entire source is MIT, except pyrsistent/_toolz.py which is BSD. # The entire source is MIT, except pyrsistent/_toolz.py which is BSD.
License: MIT and BSD License: MIT and BSD
URL: https://github.com/tobgu/pyrsistent/ URL: https://github.com/tobgu/pyrsistent/
Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz Source0: %{url}/archive/v%{version}/pyrsistent-%{version}.tar.gz
# Relax dependencies specified in setup.py (allow newer pytest/hypothesis) # Relax dependencies specified in setup.py (allow newer pytest/hypothesis)
Patch0: 00-relax-dependencies.patch Patch0: 00-relax-dependencies.patch
@ -87,14 +85,14 @@ original structure is left untouched.}
%description %{common_description} %description %{common_description}
%package -n python3-%{srcname} %package -n python3-pyrsistent
Summary: %{summary} Summary: %{summary}
%description -n python3-%{srcname} %{common_description} %description -n python3-pyrsistent %{common_description}
%package doc %package doc
Summary: Documentation for %{srcname} Summary: Documentation for pyrsistent
BuildArch: noarch BuildArch: noarch
@ -102,7 +100,7 @@ BuildArch: noarch
%prep %prep
%autosetup -n %{srcname}-%{version} -p1 %autosetup -n pyrsistent-%{version} -p1
%generate_buildrequires %generate_buildrequires
@ -121,16 +119,16 @@ rm -f docs/build/html/.buildinfo
%install %install
%pyproject_install %pyproject_install
%pyproject_save_files %{srcname} _%{srcname}_version pvectorc %pyproject_save_files pyrsistent _pyrsistent_version pvectorc
%check %check
%pytest %pytest
# See tox.ini: # See tox.ini:
env PYTHONHASHSEED=0 %pytest --doctest-modules %{srcname} env PYTHONHASHSEED=0 %pytest --doctest-modules pyrsistent
%files -n python3-%{srcname} -f %{pyproject_files} %files -n python3-pyrsistent -f %{pyproject_files}
%license LICENSE.mit %license LICENSE.mit