## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 5; 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 # Needed for Python bootstrap %bcond_without tests Name: python-pyproject-hooks Version: 1.0.0 Release: %autorelease Summary: Wrappers to call pyproject.toml-based build backend hooks License: MIT URL: https://pypi.org/project/pyproject_hooks/ Source: %{pypi_source pyproject_hooks} BuildArch: noarch BuildRequires: python3-devel # python3 bootstrap: this is rebuilt before the final build of python3, which # adds the dependency on python3-rpm-generators, so we require it manually BuildRequires: python3-rpm-generators %global _description %{expand: This is a low-level library for calling build-backends in pyproject.toml-based project. It provides the basic functionality to help write tooling that generates distribution files from Python projects.} %description %_description %package -n python3-pyproject-hooks Summary: %{summary} %description -n python3-pyproject-hooks %_description %prep %autosetup -p1 -n pyproject_hooks-%{version} sed -i "/flake8/d" dev-requirements.txt %generate_buildrequires # Use pyproject-hooks from the source directory instead of installing it. # This helps with bootstrapping and ensures that the new version works. export PYTHONPATH="$(pwd)/src" (%{pyproject_buildrequires %{?with_tests:-t}}) | grep -v pyproject-hooks %build export PYTHONPATH="$(pwd)/src" %pyproject_wheel %install # python3 bootstrap: this should be built right after pip so we can use it to # install the built wheel %pyproject_install %pyproject_save_files pyproject_hooks %if %{with tests} %check %tox %endif %files -n python3-pyproject-hooks -f %{pyproject_files} %doc README.rst %license LICENSE %changelog * Tue Jan 24 2023 Tomáš Hrnčiar - 1.0.0-4 - Add bcond to disable tests, needed for Python bootstrap * Fri Jan 20 2023 Fedora Release Engineering - 1.0.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Thu Jan 12 2023 Lumír Balhar - 1.0.0-1 - Initial package