## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## 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 %global pypi_name commoncode Name: python-%{pypi_name} Version: 31.2.1 Release: %autorelease Summary: Common functions and utilities for handling paths, dates, files and hashes # Python-2.0: # - src/commoncode/dict_utils.py # - src/commoncode/fileutils.py # LicenseRef-Fedora-Public-Domain: src/commoncode/functional.py License: Apache-2.0 AND Python-2.0 AND LicenseRef-Fedora-Public-Domain URL: https://github.com/nexB/commoncode Source: %url/archive/v%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(pytest) BuildRequires: python3dist(sphinx) BuildRequires: python3dist(sphinx-reredirects) BuildRequires: python3dist(sphinx-rtd-theme) BuildRequires: python3dist(py) %global common_description %{expand: Commoncode provides a set of common functions and utilities for handling various things like paths, dates, files and hashes. It started as library in scancode-toolkit.} %description %{common_description} %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %{common_description} %package -n python-%{pypi_name}-doc Summary: Documentation for python-%{pypi_name} # BSD-2-Clause: Sphinx javascript # MIT: jquery License: Apache-2.0 AND BSD-2-Clause AND MIT BuildArch: noarch Requires: python3-%{pypi_name} = %{?epoch:%{epoch}:}%{version}-%{release} Provides: bundled(js-sphinx_javascript_frameworks_compat) Provides: bundled(js-doctools) Provides: bundled(js-jquery) Provides: bundled(js-language_data) Provides: bundled(js-searchtools) %description -n python-%{pypi_name}-doc %{common_description} This package is providing the documentation for %{pypi_name}. %prep %autosetup -p1 -n %{pypi_name}-%{version} sed -i 's|\(fallback_version = "\)[^"]*|\1%{version}|' pyproject.toml %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel # generate html docs sphinx-build-3 -b html docs/source html # remove the sphinx-build-3 leftovers rm -rf html/.{doctrees,buildinfo} %install %pyproject_install %pyproject_save_files %{pypi_name} %check export LC_ALL=C.UTF-8 %if 0%{?fedora} < 40 %pytest %else # https://github.com/nexB/commoncode/issues/56 %pytest -k "not test_safe_path_posix_style_chinese_char" %endif %files -n python3-%{pypi_name} -f %{pyproject_files} %doc AUTHORS.rst CHANGELOG.rst CODE_OF_CONDUCT.rst README.rst %license etc/scripts/gen_pypi_simple.py.NOTICE %license src/commoncode/dict_utils.ABOUT %license src/commoncode/python.LICENSE %files -n python-%{pypi_name}-doc %doc html %changelog ## START: Generated by rpmautospec * Fri Jul 19 2024 Fedora Release Engineering - 31.2.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Fri Jun 07 2024 Python Maint - 31.2.1-2 - Rebuilt for Python 3.13 * Wed May 22 2024 Robert-André Mauchin - 31.2.1-1 - Update to 31.2.1 * Fri Jan 26 2024 Fedora Release Engineering - 31.0.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 31.0.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Oct 22 2023 Robert-André Mauchin - 31.0.3-1 - Initial import ## END: Generated by rpmautospec