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-%{srcname}
Name: python-pyrsistent
Summary: Persistent/Functional/Immutable data structures
Version: 0.18.0
Release: %autorelease
@ -8,7 +6,7 @@ Release: %autorelease
# The entire source is MIT, except pyrsistent/_toolz.py which is BSD.
License: MIT and BSD
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)
Patch0: 00-relax-dependencies.patch
@ -87,14 +85,14 @@ original structure is left untouched.}
%description %{common_description}
%package -n python3-%{srcname}
%package -n python3-pyrsistent
Summary: %{summary}
%description -n python3-%{srcname} %{common_description}
%description -n python3-pyrsistent %{common_description}
%package doc
Summary: Documentation for %{srcname}
Summary: Documentation for pyrsistent
BuildArch: noarch
@ -102,7 +100,7 @@ BuildArch: noarch
%prep
%autosetup -n %{srcname}-%{version} -p1
%autosetup -n pyrsistent-%{version} -p1
%generate_buildrequires
@ -121,16 +119,16 @@ rm -f docs/build/html/.buildinfo
%install
%pyproject_install
%pyproject_save_files %{srcname} _%{srcname}_version pvectorc
%pyproject_save_files pyrsistent _pyrsistent_version pvectorc
%check
%pytest
# 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