Name: python-cmake Version: 3.30.2 Release: %autorelease Summary: This project provides the infrastructure to build CMake Python wheels License: Apache-2.0 URL: https://github.com/scikit-build/cmake-python-distributions Source: %{url}/archive/refs/tags/%{version}.tar.gz Patch: python-cmake-Use_system_prefix.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(pytest) BuildRequires: cmake BuildRequires: tomcli %global _description %{expand: This project provides the infrastructure to build CMake Python wheels.} %description %_description %package -n python3-cmake Summary: %{summary} Requires: cmake %description -n python3-cmake %_description %prep %autosetup -p1 -n cmake-python-distributions-%{version} tomcli-set pyproject.toml str 'project.version' '%{_cmake_version}' tomcli-set pyproject.toml del 'project.scripts' sed -i 's/expected_version = .*/expected_version = "%{_cmake_version}"/p' tests/test_cmake.py %generate_buildrequires %pyproject_buildrequires %build # Do not actually build CMake %{pyproject_wheel %{shrink: -C wheel.cmake=false }} %install %pyproject_install %pyproject_save_files cmake %check # Skip tests that cannot work # cmake_https: Internet connection # cmake_script: Tries to find executables within cmake/data/... %pytest -k "not (cmake_https or cmake_script)" %files -n python3-cmake -f %{pyproject_files} %doc README.rst %changelog %autochangelog