File python3-cmake.spec of Package python-cmake
#
# spec file for package python-cmake
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source DefinitioBuildRequires: %{python_module pip}n (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: python3-cmake
Version: 4.0.2
Release: 0
Summary: CMake is an open-source, cross-platform family of tools designed to build, test and package software
License: Apache-2.0
URL: https://cmake.org
Source0: https://files.pythonhosted.org/packages/source/c/cmake/cmake-%{version}.tar.gz
Source1: cmake-%{version}.tar.gz.1
BuildRequires: python-rpm-macros
BuildRequires: %{python_module build}
BuildRequires: %{python_module installer}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: %{python_module scikit-build-core >= 0.10}
BuildRequires: pkgconfig(openssl)
BuildRequires: gcc-c++
BuildRequires: fdupes
ExclusiveArch: x86_64
%description
CMake is used to control the software compilation process using simple platform
and compiler independent configuration files, and generate native makefiles and
workspaces that can be used in the compiler environment of your choice.
%prep
%autosetup -p1 -n cmake-%{version}
mkdir "%{_sourcedir}/source"
cp %{SOURCE1} "%{_sourcedir}/source/cmake-%{version}.tar.gz"
%build
python3 -m build --wheel --no-isolation -Ccmake.define.CMakePythonDistributions_ARCHIVE_DOWNLOAD_DIR="%{_sourcedir}/source"
%install
_wheel_file=$(find . -name "*cmake*.whl" | head -n 1)
echo $_wheel_file
python3 -m installer --destdir=%{buildroot} $_wheel_file
%fdupes %{buildroot}%{python_sitearch}
%files
%doc AUTHORS.rst README.rst
%license LICENSE_Apache_20 LICENSE_BSD_3
%{_bindir}/ccmake
%{_bindir}/cmake
%{_bindir}/cpack
%{_bindir}/ctest
%{python_sitearch}/cmake
%{python_sitearch}/cmake-%{version}.dist-info
%changelog