## 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-frozenlist Version: 1.4.0 Release: %autorelease Summary: List-like structure which can be made immutable License: Apache-2.0 URL: https://github.com/aio-libs/frozenlist Source: %{pypi_source frozenlist} BuildRequires: python3-devel BuildRequires: gcc BuildRequires: python3dist(cython) BuildRequires: python3dist(pytest) %if %{with doc} BuildRequires: make BuildRequires: python3dist(sphinx) BuildRequires: python3-sphinx-latex BuildRequires: latexmk %endif %global common_description %{expand: FrozenList is a list-like structure which implements collections.abc.MutableSequence, and which can be made immutable.} %description %{common_description} %package -n python3-frozenlist Summary: %{summary} %description -n python3-frozenlist %{common_description} %if %{with doc} %package doc Summary: Documentation for python-frozenlist BuildArch: noarch %description doc %{common_description} %endif %prep %autosetup -n frozenlist-%{version} # Remove Cython-generated sources; we must ensure they are regenerated. find . -type f -name '*.c' -print -delete # Drop intersphinx mappings, since we can’t download remote inventories and # can’t easily produce working hyperlinks from inventories in local # documentation packages. echo 'intersphinx_mapping.clear()' >> docs/conf.py %generate_buildrequires %pyproject_buildrequires %build # Re-generate C sources with Cython. Imitates Makefile on GitHub. %{python3} -m cython -3 frozenlist/*.pyx -I frozenlist %pyproject_wheel %if %{with doc} %make_build -C docs latex SPHINXOPTS='-j%{?_smp_build_ncpus}' %make_build -C docs/_build/latex LATEXMKOPTS='-quiet' %endif %install %pyproject_install %pyproject_save_files -l frozenlist %check %pytest %files -n python3-frozenlist -f %{pyproject_files} %if %{without doc} %doc CHANGES.rst CONTRIBUTORS.txt README.rst %endif %if %{with doc} %files doc %license LICENSE %doc CHANGES.rst CONTRIBUTORS.txt README.rst %doc docs/_build/latex/frozenlist.pdf %endif %changelog * Mon Dec 18 2023 Benjamin A. Beasley - 1.4.0-3 - Assert that %%pyproject_files contains a license file * Fri Jul 21 2023 Fedora Release Engineering - 1.4.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Thu Jul 13 2023 Benjamin A. Beasley - 1.4.0-1 - Update to 1.4.0 (close RHBZ#2222472) * Tue Jul 11 2023 Benjamin A. Beasley - 1.3.3-7 - When PDF docs are disabled, omit the -doc subpackage * Fri Jul 07 2023 Benjamin A. Beasley - 1.3.3-6 - Use new (rpm 4.17.1+) bcond style * Wed Jun 14 2023 Python Maint - 1.3.3-5 - Rebuilt for Python 3.12 * Fri Mar 17 2023 Benjamin A. Beasley - 1.3.3-3 - Don’t assume %%_smp_mflags is -j%%_smp_build_ncpus * Fri Jan 20 2023 Fedora Release Engineering - 1.3.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Thu Nov 10 2022 Benjamin A. Beasley - 1.3.3-1 - Update to 1.3.3 (close RHBZ#2141069) * Wed Aug 03 2022 Benjamin A. Beasley - 1.3.1-1 - Update to 1.3.1 (close RHBZ#2114752) * Wed Aug 03 2022 Benjamin A. Beasley - 1.3.0-5 - Convert License to SPDX (ASL 2.0 becomes Apache-2.0) * Fri Jul 22 2022 Fedora Release Engineering - 1.3.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 1.3.0-3 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 1.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Jan 18 2022 Benjamin A. Beasley - 1.3.0-1 - Update to 1.3.0 (fix RHBZ#2041998) * Fri Jan 07 2022 Benjamin A. Beasley - 1.2.0-2 - Drop intersphinx mappings * Mon Dec 13 2021 Benjamin A. Beasley - 1.2.0-1 - Initial package (close RHBZ#2029651)