## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; 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 Name: python-py-key-value-shared Version: 0.3.0 Release: %autorelease Summary: Shared code between key-value-aio and key-value-sync License: Apache-2.0 URL: https://github.com/strawgate/py-key-value Source: https://github.com/strawgate/py-key-value/archive/refs/tags/%{version}.tar.gz # Only build for Fedora 43+ %if 0%{?fedora} < 43 # Skip builds for Fedora < 43 ExcludeArch: %{_arch} %endif BuildArch: noarch BuildRequires: python3-devel BuildRequires: tomcli # Tests disabled - dependencies not available in build environment # BuildRequires: python3-pytest # BuildRequires: python3-inline-snapshot %global _description %{expand: This is package 'py-key-value-shared' generated automatically by pyp2spec.} %description %_description %generate_buildrequires cd key-value/key-value-shared %pyproject_buildrequires %package -n python3-py-key-value-shared Summary: %{summary} %description -n python3-py-key-value-shared %_description %prep # Extract the tarball %autosetup -n py-key-value-%{version} -p1 # Change into the key-value-shared subdirectory and work from there cd key-value/key-value-shared # Patch pyproject.toml to use setuptools instead of uv_build (not available in Fedora) tomcli set pyproject.toml lists str "build-system.requires" "setuptools>=61" "wheel" tomcli set pyproject.toml str "build-system.build-backend" "setuptools.build_meta" # Relax version constraints to work with Fedora package versions tomcli set pyproject.toml arrays replace project.dependencies "typing-extensions>=([0-9]+\.[0-9]+)" "typing-extensions>=4.12" tomcli set pyproject.toml arrays replace project.dependencies "beartype>=([0-9]+\.[0-9]+)" "beartype>=0.18" # Remove pytest arguments that aren't available in Fedora tomcli set pyproject.toml lists str "tool.pytest.ini_options.addopts" # Also patch key-value-shared-test to use setuptools cd ../key-value-shared-test tomcli set pyproject.toml lists str "build-system.requires" "setuptools>=61" "wheel" tomcli set pyproject.toml str "build-system.build-backend" "setuptools.build_meta" cd ../key-value-shared %build cd key-value/key-value-shared %pyproject_wheel %install cd key-value/key-value-shared %pyproject_install %check # Tests are currently disabled due to missing test dependencies in the build environment # TODO: Re-enable tests once shared-test dependencies are properly configured # cd key-value/key-value-shared-test # pip3 install --no-build-isolation --no-deps --target %{_builddir}/test-deps . # export PYTHONPATH=%{_builddir}/test-deps:$PYTHONPATH # cd ../key-value-shared # %pytest %files -n python3-py-key-value-shared %doc README.md %{python3_sitelib}/key_value/ %{python3_sitelib}/py_key_value_shared-%{version}.dist-info/ %changelog ## START: Generated by rpmautospec * Tue Jan 06 2026 John Doe - 0.3.0-1 - Uncommitted changes ## END: Generated by rpmautospec