diff --git a/python-pyrsistent.spec b/python-pyrsistent.spec index 00e8f05..2177ffd 100644 --- a/python-pyrsistent.spec +++ b/python-pyrsistent.spec @@ -1,4 +1,4 @@ -%global pypi_name pyrsistent +%global srcname pyrsistent %global common_description %{expand: Pyrsistent is a number of persistent collections (by some referred to as @@ -9,47 +9,96 @@ All methods on a data structure that would normally mutate it instead return a new copy of the structure containing the requested updates. The original structure is left untouched.} -Name: python-%{pypi_name} +Name: python-%{srcname} Summary: Persistent/Functional/Immutable data structures Version: 0.17.3 -Release: 2%{?dist} -License: MIT +Release: 3%{?dist} +# The entire source is MIT, except pyrsistent/_toolz.py which is BSD. +License: MIT and BSD URL: http://github.com/tobgu/pyrsistent/ Source0: %{pypi_source} -# relax dependencies specified in setup.py +# Relax dependencies specified in setup.py (allow newer pytest/hypothesis) Patch0: 00-relax-dependencies.patch BuildRequires: gcc BuildRequires: python3-devel +BuildRequires: make +# ============================================================================ +# From requirements.txt: + +# hypothesis BuildRequires: python3dist(hypothesis) + +# ---------------------------------------------------------------------------- +# We do not need these, since we are not running the memorytest* environment +# from tox.ini. +# ---------------------------------------------------------------------------- +# memory-profiler==0.57.0 +# psutil==5.7.0 +# pyperform + +# ---------------------------------------------------------------------------- +# We do not need this, since we are not running the benchmarks from +# performance_suites/. +# ---------------------------------------------------------------------------- +# BuildRequires: python3dist(pyperform) + +# pytest BuildRequires: python3dist(pytest) +# Sphinx +BuildRequires: python3dist(sphinx) +# sphinx-rtd-theme==0.1.5 +BuildRequires: python3dist(sphinx-rtd-theme) + +# ---------------------------------------------------------------------------- +# We do not need this, since we are not using tox to run the tests. +# ---------------------------------------------------------------------------- +# tox + +# setuptools>=0.16.1 +BuildRequires: python3dist(setuptools) >= 0.16.1 + +# ---------------------------------------------------------------------------- +# We do not need these for the RPM build either. +# ---------------------------------------------------------------------------- +# twine>=3.2 +# pip>=20.2.3 + +# ============================================================================ +# From setup_requires in setup.py, when tests are to be executed: BuildRequires: python3dist(pytest-runner) -BuildRequires: python3dist(setuptools) -BuildRequires: python3dist(six) + +# Note that pyrsistent/_toolz.py contains a bit of code ported from toolz, but +# not enough to constitute a bundled dependency. %description %{common_description} -%package -n python3-%{pypi_name} +%package -n python3-%{srcname} Summary: %{summary} -%{?python_provide:%python_provide python3-%{pypi_name}} +%description -n python3-%{srcname} %{common_description} -%description -n python3-%{pypi_name} %{common_description} + +%package doc +Summary: Documentation for %{srcname} + +BuildArch: noarch + +%description doc %{common_description} %prep -%autosetup -n %{pypi_name}-%{version} -p1 - -# Remove bundled egg-info -rm -rf %{pypi_name}.egg-info +%autosetup -n %{srcname}-%{version} -p1 %build %py3_build +%make_build -C docs html SPHINXOPTS='--keep-going' +rm -f docs/build/html/.buildinfo %install @@ -57,22 +106,35 @@ rm -rf %{pypi_name}.egg-info %check -%{__python3} setup.py test +%pytest +# See tox.ini: +env PYTHONHASHSEED=0 %pytest --doctest-modules %{srcname} -%files -n python3-%{pypi_name} -%doc README.rst +%files -n python3-%{srcname} %license LICENCE.mit -%{python3_sitearch}/_pyrsistent_version.py -%{python3_sitearch}/__pycache__/* +%pycached %{python3_sitearch}/_pyrsistent_version.py -%{python3_sitearch}/%{pypi_name}/ +%{python3_sitearch}/%{srcname}/ %{python3_sitearch}/pvectorc.cpython-3*.so -%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%{python3_sitearch}/%{srcname}-%{version}-py%{python3_version}.egg-info/ + + +%files doc +%license LICENCE.mit +%doc CHANGES.txt +%doc README.rst +%doc docs/build/html %changelog +* Thu Feb 18 2021 Benjamin A. Beasley - 0.17.3-3 +- Replace pypi_name macro with srcname +- Update BR’s +- Run the doctests +- Build documentation in a new -doc subpackage + * Wed Jan 27 2021 Fedora Release Engineering - 0.17.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild