commit af6f6abd06f0f6f752718ef4033ea069189676978e109f6349873ef3393952f3 Author: Matej Cepl Date: Fri Jan 27 20:11:11 2023 +0000 Accepting request 1061616 from home:bnavigator:branches:devel:languages:python:numeric new build backend: used by awkward-cpp OBS-URL: https://build.opensuse.org/request/show/1061616 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-scikit-build-core?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-scikit-build-core.changes b/python-scikit-build-core.changes new file mode 100644 index 0000000..26fe111 --- /dev/null +++ b/python-scikit-build-core.changes @@ -0,0 +1,7 @@ +------------------------------------------------------------------- +Fri Jan 27 17:59:12 UTC 2023 - Ben Greiner + +- Initial specfile for v0.1.5 +- New build backend. First user: python-awkward-cpp +- Add patch: scikit-build-core-offline-wheelhouse.patch for + offline wheelhouse in testing diff --git a/python-scikit-build-core.spec b/python-scikit-build-core.spec new file mode 100644 index 0000000..602d73a --- /dev/null +++ b/python-scikit-build-core.spec @@ -0,0 +1,126 @@ +# +# spec file for package python-scikit-build-core +# +# Copyright (c) 2023 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 Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: python-scikit-build-core +Version: 0.1.5 +Release: 0 +Summary: Build backend for CMake based projects +License: Apache-2.0 +URL: https://github.com/scikit-build/scikit-build-core +Source: https://files.pythonhosted.org/packages/source/s/scikit_build_core/scikit_build_core-0.1.5.tar.gz +# PATCH-FEATURE-OPENSUSE scikit-build-core-offline-wheelhouse.patch provide the testing wheels without runtime download code@bnavigator.de +Patch1: scikit-build-core-offline-wheelhouse.patch +BuildRequires: %{python_module base >= 3.7} +BuildRequires: %{python_module hatch-vcs} +BuildRequires: %{python_module hatchling} +BuildRequires: %{python_module packaging >= 20.9} +BuildRequires: %{python_module pip} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: (python-exceptiongroup if python-base < 3.11) +Requires: (python-importlib-resources >= 1.3 if python-base < 3.9) +Requires: (python-tomli >= 1.1 if python-base < 3.11) +Requires: (python-typing-extensions >= 3.10.0 if python-base < 3.8) +Requires: cmake >= 3.15 +Requires: python-packaging >= 20.9 +Recommends: ninja +Recommends: python-rich +Provides: python-scikit_build_core = %{version}-%{release} +# SECTION require runtime +BuildRequires: %{python_module exceptiongroup if %python-base < 3.11} +BuildRequires: %{python_module importlib-resources >= 1.3 if %python-base < 3.9} +BuildRequires: %{python_module tomli >= 1.1 if %python-base < 3.11} +BuildRequires: %{python_module typing-extensions >= 3.10.0 if %python-base < 3.8} +BuildRequires: cmake >= 3.15 +BuildArch: noarch +# /SECITON +# SECTION test requirements +BuildRequires: %{python_module build} +BuildRequires: %{python_module cattrs >= 22.2.0} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module distlib >= 0.3.5} +BuildRequires: %{python_module importlib-metadata if %python-base < 3.8} +BuildRequires: %{python_module pathspec >= 0.10.1} +BuildRequires: %{python_module pybind11-devel} +BuildRequires: %{python_module pyproject-metadata >= 0.5} +BuildRequires: %{python_module pytest >= 7.2} +BuildRequires: %{python_module pytest-subprocess} +BuildRequires: %{python_module rich} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: gcc-c++ +BuildRequires: ninja +# /SECTION +%python_subpackages + +%description +Python CMake adaptor and Python API for plugins + +Features over classic Scikit-build: + - Better warnings, errors, and logging + - No warning about unused variables + - Automatically adds Ninja and/or CMake only as required + - No dependency on setuptools, distutils, or wheel in build mode. + - Powerful config system, including config options support in build mode. + - Automatic inclusion of site-packages in CMAKE_PREFIX_PATH + - FindPython is backported if running on CMake < 3.24 (included via hatchling in a submodule, configurable) + - Limited API / Stable ABI and pythonless tags supported via config option + - No slow generator search, ninja/make or MSVC used by default, respects CMAKE_GENERATOR + - SDists are reproducible by default (UNIX, Python 3.9+) + +%package pyproject +Summary: The scikit_build_core[pyproject] extra +Requires: python-scikit-build-core = %{version} +Requires: python-distlib >= 0.3.5 +Requires: python-pathspec >= 0.10.1 +Requires: python-pyproject-metadata >= 0.5 +Provides: python-scikit_build_core-pyproject = %{version}-%{release} + +%description pyproject +Python CMake adaptor and Python API for plugins: The extra requirement to build PEP518 wheels and sdists + +%prep +%autosetup -p1 -n scikit_build_core-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# no wheel dependencies for isolated build provided +donttestmark="isolated" +# missing isolated marker: no rich wheel -- gh#scikit-build/scikit-build-core#182 +donttest="test_pep518_sdist" +# different hash due to different build environment: +donttest="$donttest or test_pep517_sdist_hash" +%pytest -m "not ($donttestmark)" -k "not ($donttest)" + +%files %{python_files} +%license LICENSE +%doc README.md +%{python_sitelib}/scikit_build_core +%{python_sitelib}/scikit_build_core-%{version}.dist-info + +%files %{python_files pyproject} +%license LICENSE +%doc README.md + +%changelog diff --git a/scikit-build-core-offline-wheelhouse.patch b/scikit-build-core-offline-wheelhouse.patch new file mode 100644 index 0000000..77f8742 --- /dev/null +++ b/scikit-build-core-offline-wheelhouse.patch @@ -0,0 +1,54 @@ +diff -ur scikit_build_core-0.1.5.orig/tests/conftest.py scikit_build_core-0.1.5/tests/conftest.py +--- scikit_build_core-0.1.5.orig/tests/conftest.py 2023-01-27 19:49:07.842530605 +0100 ++++ scikit_build_core-0.1.5/tests/conftest.py 2023-01-27 19:56:01.269327907 +0100 +@@ -27,49 +27,7 @@ + + @pytest.fixture(scope="session") + def pep518_wheelhouse(tmp_path_factory: pytest.TempPathFactory) -> Path: +- wheelhouse = tmp_path_factory.mktemp("wheelhouse") +- +- subprocess.run( +- [ +- sys.executable, +- "-m", +- "pip", +- "wheel", +- "--wheel-dir", +- str(wheelhouse), +- f"{BASE}[pyproject]", +- ], +- check=True, +- ) +- packages = [ +- "build", +- "pybind11", +- "rich", +- "setuptools", +- "virtualenv", +- "wheel", +- ] +- +- if importlib.util.find_spec("cmake") is not None: +- packages.append("cmake") +- +- if importlib.util.find_spec("ninja") is not None: +- packages.append("ninja") +- +- subprocess.run( +- [ +- sys.executable, +- "-m", +- "pip", +- "download", +- "-q", +- "-d", +- str(wheelhouse), +- *packages, +- ], +- check=True, +- ) +- return wheelhouse ++ return os.getcwd() + '/build' + + + class VEnv(EnvBuilder): diff --git a/scikit_build_core-0.1.5.tar.gz b/scikit_build_core-0.1.5.tar.gz new file mode 100644 index 0000000..2330e9f --- /dev/null +++ b/scikit_build_core-0.1.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3944bf40e6817740c306b0e4f1cdcbcc5acf56b545eb910940f4631ad9d49a35 +size 107005