Skip to content

Commit d836728

Browse files
authored
feat(setuptools): adding wrapper for skbuild compat (#315)
Also small fix for coverage (I hope). Signed-off-by: Henry Schreiner <[email protected]>
1 parent 9d3b66e commit d836728

File tree

3 files changed

+54
-1
lines changed

3 files changed

+54
-1
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ jobs:
101101
- name: Upload coverage report
102102
uses: codecov/codecov-action@v3
103103
with:
104-
name: ${{ runner.os }}-${{ matrix.python-version }}
104+
name:
105+
${{ runner.os }}-${{ matrix.python-version }}-${{
106+
matrix.cmake-version }}
105107
verbose: true
106108
token: 6d9cc0e0-158a-41ee-b8f4-0318d3595ac2
107109

docs/api/scikit_build_core.setuptools.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,11 @@ scikit\_build\_core.setuptools.build\_meta module
2424
:members:
2525
:undoc-members:
2626
:show-inheritance:
27+
28+
scikit\_build\_core.setuptools.wrapper module
29+
---------------------------------------------
30+
31+
.. automodule:: scikit_build_core.setuptools.wrapper
32+
:members:
33+
:undoc-members:
34+
:show-inheritance:
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
from __future__ import annotations
2+
3+
import warnings
4+
from collections.abc import Callable, Sequence
5+
from typing import Any
6+
7+
import setuptools
8+
9+
__all__ = ["setup"]
10+
11+
12+
def __dir__() -> list[str]:
13+
return __all__
14+
15+
16+
def setup(
17+
*,
18+
cmake_args: Sequence[str] = (),
19+
cmake_install_dir: str = "",
20+
cmake_source_dir: str = "",
21+
cmake_with_sdist: bool = False,
22+
cmake_languages: Sequence[str] | None = None,
23+
cmake_minimum_required_version: str | None = None,
24+
cmake_process_manifest_hook: Callable[[list[str]], list[str]] | None = None,
25+
cmake_install_target: str = "install",
26+
**kw: Any,
27+
) -> None:
28+
assert not cmake_install_dir, "cmake_install_dir not supported yet"
29+
assert not cmake_with_sdist, "cmake_with_sdist not supported yet"
30+
assert (
31+
cmake_process_manifest_hook is None
32+
), "cmake_process_manifest_hook not supported yet"
33+
assert cmake_install_target == "install", "cmake_install_target not supported yet"
34+
35+
if cmake_languages is not None:
36+
warnings.warn("cmake_languages no longer has any effect", stacklevel=2)
37+
38+
if cmake_minimum_required_version is not None:
39+
warnings.warn("Set via pyproject.toml", stacklevel=2)
40+
41+
return setuptools.setup(
42+
cmake_source_dir=cmake_source_dir, cmake_args=cmake_args, **kw
43+
)

0 commit comments

Comments
 (0)