## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Sphinx-generated HTML documentation is not suitable for packaging; see # https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. # # We can generate PDF documentation as a substitute. %bcond doc 1 Name: python-pyrsistent Summary: Persistent/Functional/Immutable data structures Version: 0.20.0 Release: %autorelease # The entire source is (SPDX) MIT, except pyrsistent/_toolz.py which is BSD-3-Clause. License: MIT AND BSD-3-Clause URL: https://github.com/tobgu/pyrsistent/ Source: %{url}/archive/v%{version}/pyrsistent-%{version}.tar.gz # Replace _PyList_Extend with PyList_SetSlice # https://github.com/tobgu/pyrsistent/pull/284 # # Together with the 0.20.0 release, this fixes: # # python-pyrsistent fails to build with Python 3.13: implicit declaration of # function ‘Py_TRASHCAN_SAFE_BEGIN’, ‘Py_TRASHCAN_SAFE_END’, ‘_PyList_Extend’ # https://bugzilla.redhat.com/show_bug.cgi?id=2246349 Patch: %{url}/pull/284.patch BuildRequires: python3-devel BuildRequires: gcc # For Sphinx documentation %if %{with doc} BuildRequires: make BuildRequires: python3-sphinx-latex BuildRequires: latexmk %endif # There is fancy machinery in setup.py to add pytest-runner to setup_requires # in setup.py when it looks like tests are to be executed. Since we will not use # “python3 setup.py test” to run tests, we can do without this dependency. # Note that pyrsistent/_toolz.py contains a bit of code ported from toolz, but # not enough to constitute a bundled dependency. %global common_description %{expand: Pyrsistent is a number of persistent collections (by some referred to as functional data structures). Persistent in the sense that they are immutable. 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.} %description %{common_description} %package -n python3-pyrsistent Summary: %{summary} %description -n python3-pyrsistent %{common_description} %if %{with doc} %package doc Summary: Documentation for pyrsistent # The Sphinx documentation does contain content based on pyrsistent/_toolz.py, # so the full License carries over from the base package. BuildArch: noarch %description doc %{common_description} %endif %prep %autosetup -n pyrsistent-%{version} -p1 # Remove all version pins for documentation dependencies. These tend to just be # the latest versions at the time of release, and are generally not based on # any particular analysis. In any case, we must attempt to use whatever is # packaged. sed -r 's/[>=]=.*//' docs/requirements.in | tee docs/requirements.in.unpinned # Loosen exact-version pins in requirements.txt; we must tolerate newer # versions and use what is packaged. # # We do not need: # - hypothesis, not included in RHEL # - memory-profiler or psutil, since we are not running the memorytest* # environment from tox.ini # - pip-tools, since it is for making pinned requirements files # - pyperform, since we are not running the benchmarks from # performance_suites/ # - tox, since we are not using tox to run the tests # - twine, since it is for maintainer PyPI uploads sed -r \ -e 's/==/>=/' \ -e '/\b(memory-profiler|pip-tools|psutil|pyperform|tox|twine)\b/d' \ %if %{defined rhel} -e '/\bhypothesis\b/d' \ %endif requirements.txt %{?with_doc:docs/requirements.in.unpinned} | tee requirements-filtered.txt %generate_buildrequires %pyproject_buildrequires requirements-filtered.txt %build %pyproject_wheel # Default SPHINXOPTS are '-W -n', but -W turns warnings into errors and there # are some warnings. We want to build the documentation as best we can anyway. # Additionally, we parallelize sphinx-build. %if %{with doc} PYTHONPATH="${PWD}" %make_build -C docs latex \ SPHINXOPTS='-n -j%{?_smp_build_ncpus}' %make_build -C docs/build/latex LATEXMKOPTS='-quiet' %endif %install %pyproject_install %pyproject_save_files -l pyrsistent _pyrsistent_version pvectorc %check # See tox.ini: %pytest %{?rhel:--ignore=tests/hypothesis_vector_test.py} %pytest --doctest-modules pyrsistent %files -n python3-pyrsistent -f %{pyproject_files} %if %{without doc} %doc CHANGES.txt README.rst %endif %if %{with doc} %files doc %license LICENSE.mit %doc CHANGES.txt README.rst %doc docs/build/latex/Pyrsistent.pdf %endif %changelog * Mon Dec 18 2023 Benjamin A. Beasley - 0.20.0-3 - Assert that %%pyproject_files contains a license file * Thu Oct 26 2023 Benjamin A. Beasley - 0.20.0-2 - Patch for Python 3.13 (close RHBZ#2246349) * Thu Oct 26 2023 Benjamin A. Beasley - 0.20.0-1 - Update to 0.20.0 (fix RHBZ#2246235, fix RHBZ#2246349) * Fri Jul 21 2023 Fedora Release Engineering - 0.19.3-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Wed Jul 12 2023 Benjamin A. Beasley - 0.19.3-9 - When PDF docs are disabled, omit the -doc subpackage * Fri Jul 07 2023 Benjamin A. Beasley - 0.19.3-8 - Use new (rpm 4.17.1+) bcond style * Thu Jun 15 2023 Python Maint - 0.19.3-7 - Rebuilt for Python 3.12 * Mon May 29 2023 Benjamin A. Beasley - 0.19.3-6 - Drop an unnecessary BuildRequires on pytest-runner * Sat Mar 18 2023 Benjamin A. Beasley - 0.19.3-4 - Don’t assume %%_smp_mflags is -j%%_smp_build_ncpus * Fri Feb 10 2023 Yaakov Selkowitz - 0.19.3-3 - Avoid python-hypothesis dependency in RHEL builds * Fri Jan 20 2023 Fedora Release Engineering - 0.19.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Thu Dec 29 2022 Benjamin A. Beasley - 0.19.3-1 - Update to 0.19.3 (close RHBZ#2156882) * Thu Dec 29 2022 Benjamin A. Beasley - 0.19.2-3 - Package from git tag instead of commit * Wed Nov 30 2022 Benjamin A. Beasley - 0.19.2-2 - Drop default -r argument to pyproject_buildrequires * Thu Nov 03 2022 Benjamin A. Beasley - 0.19.2-1 - Update to 0.19.2 (close RHBZ#2138666) * Mon Oct 31 2022 Benjamin A. Beasley - 0.18.1-5 - Update License to SPDX * Fri Jul 22 2022 Fedora Release Engineering - 0.18.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 0.18.1-3 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 0.18.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jan 14 2022 Benjamin A. Beasley - 0.18.1-1 - Update to 0.18.1 * Fri Jan 14 2022 Benjamin A. Beasley - 0.18.0-11 - Make pyrsistent._pmap doctests order-insensitive * Thu Jan 13 2022 Benjamin A. Beasley - 0.18.0-10 - Skip doctest that fails on Python 3.11a3 (close RHBZ#2040164) * Fri Nov 26 2021 Benjamin A. Beasley - 0.18.0-9 - Reduce LaTeX PDF build verbosity * Wed Sep 29 2021 Benjamin A. Beasley - 0.18.0-8 - Generate PDF instead of HTML Sphinx documentation. * Mon Sep 13 2021 Benjamin A. Beasley - 0.18.0-7 - Let pyproject-rpm-macros handle the license file * Sun Sep 12 2021 Benjamin A. Beasley - 0.18.0-6 - Drop BR on pyproject-rpm-macros, now implied by python3-devel * Sun Sep 12 2021 Benjamin A. Beasley - 0.18.0-5 - Reduce macro indirection in the spec file * Tue Jul 27 2021 Benjamin A. Beasley - 0.18.0-4 - Move %%generate_buildrequires after %%prep to make the spec file easier to follow * Fri Jul 23 2021 Fedora Release Engineering - 0.18.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Jun 29 2021 Benjamin A. Beasley - 0.18.0-1 - Update to 0.18.0 (closes RHBZ#1977038) * Mon Jun 14 2021 Benjamin A. Beasley - 0.17.3-8 - Port to pyproject-rpm-macros * Fri Jun 04 2021 Python Maint - 0.17.3-7 - Rebuilt for Python 3.10 * Thu Mar 25 2021 Benjamin A. Beasley - 0.17.3-6 - Improved source URL (better tarball name) * Fri Feb 19 2021 Benjamin A. Beasley - 0.17.3-5 - Parallelize Sphinx documentation build * Fri Feb 19 2021 Benjamin A. Beasley - 0.17.3-4 - Use the GitHub tarball instead of the PyPI tarball - Switch URL to HTTPS * 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 * Sun Sep 27 2020 José Lemos Neto - 0.17.3-1 - update to version 0.17.3 * Wed Jul 29 2020 Fedora Release Engineering - 0.16.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Sun May 24 2020 Miro Hrončok - 0.16.0-2 - Rebuilt for Python 3.9 * Tue Apr 14 2020 Fabio Valentini - 0.16.0-1 - Update to version 0.16.0. * Thu Jan 30 2020 Fedora Release Engineering - 0.15.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Fri Jan 10 2020 Fabio Valentini - 0.15.7-1 - Update to version 0.15.7. * Sun Nov 24 2019 Fabio Valentini - 0.15.6-1 - Update to version 0.15.6. * Thu Oct 31 2019 Fabio Valentini - 0.15.5-1 - Update to version 0.15.5. * Thu Oct 03 2019 Miro Hrončok - 0.15.4-3 - Rebuilt for Python 3.8.0rc1 (#1748018) * Sat Aug 17 2019 Miro Hrončok - 0.15.4-2 - Rebuilt for Python 3.8 * Fri Aug 02 2019 Fabio Valentini - 0.15.4-1 - Update to version 0.15.4. * Fri Jul 26 2019 Fedora Release Engineering - 0.15.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Mon Jul 08 2019 Fabio Valentini - 0.15.3-1 - Update to version 0.15.3. * Fri May 17 2019 Fabio Valentini - 0.15.2-1 - Update to version 0.15.2. * Fri Apr 26 2019 Fabio Valentini - 0.15.1-1 - Update to version 0.15.1. * Fri Feb 22 2019 Fabio Valentini - 0.14.11-1 - Update to version 0.14.11. * Sat Feb 02 2019 Fedora Release Engineering - 0.14.9-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Mon Jan 14 2019 Fabio Valentini - 0.14.9-1 - Update to version 0.14.9. - Enable the test suite. * Thu Oct 11 2018 Zbigniew Jędrzejewski-Szmek - 0.14.2-6 - Python2 binary package has been removed See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal * Sat Jul 14 2018 Fedora Release Engineering - 0.14.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok - 0.14.2-4 - Rebuilt for Python 3.7 * Mon Apr 16 2018 Itamar Reis Peixoto - 0.14.2-3 - add missing dist-tag * Fri Apr 13 2018 Itamar Reis Peixoto - 0.14.2-2 - disable tests for now * Thu Mar 01 2018 Itamar Reis Peixoto - 0.14.2-1 - new version 0.14.2 * Wed Sep 14 2016 Devrim Gündüz 0.11.13-2 - Fix packaging errors, that would own /usr/lib64 or so. * Tue Sep 13 2016 Devrim Gündüz 0.11.13-1 - Initial packaging for PostgreSQL YUM repository, to satisfy pgadmin4 dependency.