%global python3_pkgversion 3.11 %global pypi_name scikit_build Name: python%{python3_pkgversion}-scikit-build-epel Version: 0.17.1 Release: %{autorelease} Summary: Improved build system generator for Python C/C++/Fortran/Cython extensions # This project is mainly MIT but LICENSE also mentions some code # that is BSD-2-Clause-Views licensed. # All bundled(cmake()) files listed are Apache-2.0 licensed. License: MIT AND BSD-2-Clause-Views AND Apache-2.0 URL: https://github.com/scikit-build/scikit-build Source0: %{pypi_source %{pypi_name}} Patch0: 0001-tests-fix-match-for-get_map-symbol.patch Patch1: Drop-build-dep-on-hatch-vcs-fancy-pypi-readme.patch BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel # Buildsystem BuildRequires: %{py3_dist hatchling} # %%py3_install_wheel BuildRequires: %{py3_dist pip} # Runtime deps BuildRequires: %{py3_dist distro} BuildRequires: %{py3_dist packaging} BuildRequires: %{py3_dist setuptools} >= 42.0 BuildRequires: %{py3_dist wheel} >= 0.32 %global _description %{expand: Improved build system generator for CPython C/C++/Fortran/Cython extensions. Better support is available for additional compilers, build systems, cross compilation, and locating dependencies and determining their build requirements. The scikit-build package is fundamentally just glue between the setuptools Python module and CMake.} %description %_description %package -n python%{python3_pkgversion}-scikit-build Summary: %{summary} Requires: cmake Requires: ninja-build # Files listed below are located in skbuild/resources/cmake. # Since they contain "Copyright 2011 Kitware, Inc." in them we list them as bundled, # their versions are unknown. # There is no such copyright in the remaining files so we assume # they are original part of the project. Provides: bundled(cmake(FindCython)) Provides: bundled(cmake(FindPythonExtensions)) Provides: bundled(cmake(UseCython)) Provides: bundled(cmake(UseF2PY)) Provides: bundled(cmake(UsePythonExtensions)) %description -n python%{python3_pkgversion}-scikit-build %_description %prep %autosetup -p1 -n %{pypi_name}-%{version} # Remove conditional deps due to RHEL 8's deficient dependency generator that # ignores environment specifiers. # See https://bugzilla.redhat.com/2211705. sed -i \ -e "/'tomli;/d" \ -e "/'typing-extensions/d" \ pyproject.toml %build %python3 -c 'from hatchling.build import build_wheel; build_wheel("dist")' %install %py3_install_wheel scikit_build-%{version}-py3-none-any.whl DISTINFO=%{buildroot}%{python3_sitelib}/scikit_build-%{version}.dist-info rm -rv "${DISTINFO}/RECORD" "${DISTINFO}/REQUESTED" echo rpm >"${DISTINFO}/INSTALLER" %check %py3_check_import skbuild %files -n python%{python3_pkgversion}-scikit-build %doc README.* %license LICENSE %{python3_sitelib}/skbuild/ %{python3_sitelib}/scikit_build-%{version}.dist-info/ %changelog %autochangelog