Skip to content

Commit 9a4ceda

Browse files
authored
feat: add typing (#256)
1 parent 082f5f2 commit 9a4ceda

File tree

5 files changed

+27
-11
lines changed

5 files changed

+27
-11
lines changed

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ recursive-exclude CMake-src *
1111

1212
include versioneer.py
1313
include src/cmake/_version.py
14+
include src/cmake/__init__.pyi
15+
include src/cmake/py.typed

pyproject.toml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22
requires = [
33
"scikit-build>=0.12",
44
"setuptools>=42",
5-
"wheel"
65
]
76
build-backend = "setuptools.build_meta"
87

98
[tool.cibuildwheel]
109
build = "cp39-*"
1110
before-all = [
12-
"pipx install -f --pip-args=\"-c {project}/constraints-ci.txt\" cmake",
13-
"cmake --version",
14-
"pipx install -f --pip-args=\"-c {project}/constraints-ci.txt\" ninja",
15-
"ninja --version",
11+
'pipx install -f --pip-args="-c {project}/constraints-ci.txt" cmake',
12+
'cmake --version',
13+
'pipx install -f --pip-args="-c {project}/constraints-ci.txt" ninja',
14+
'ninja --version',
1615
]
1716
before-build = "pip install -r requirements-repair.txt"
1817
repair-wheel-command = "python scripts/repair_wheel.py -w {dest_dir} {wheel}"
@@ -22,11 +21,11 @@ build-verbosity = "1"
2221

2322
[tool.cibuildwheel.linux]
2423
before-all = [
25-
"pipx install -f --pip-args=\"-c {project}/constraints-ci.txt\" cmake",
26-
"cmake --version",
27-
"pipx install -f --pip-args=\"-c {project}/constraints-ci.txt\" ninja",
28-
"ninja --version",
29-
"./scripts/manylinux-build-and-install-openssl.sh",
24+
'pipx install -f --pip-args="-c {project}/constraints-ci.txt" cmake',
25+
'cmake --version',
26+
'pipx install -f --pip-args="-c {project}/constraints-ci.txt" ninja',
27+
'ninja --version',
28+
'./scripts/manylinux-build-and-install-openssl.sh',
3029
]
3130
environment = { SKBUILD_CONFIGURE_OPTIONS = "-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl -DCMAKE_JOB_POOL_COMPILE:STRING=compile -DCMAKE_JOB_POOL_LINK:STRING=link -DCMAKE_JOB_POOLS:STRING=compile=2;link=1 -DCMAKE_CXX_STANDARD:STRING=11" }
3231

@@ -52,4 +51,3 @@ MACOSX_DEPLOYMENT_TARGET = "10.10"
5251

5352
[tool.isort]
5453
profile = "black"
55-
multi_line_output = 3

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def parse_requirements(filename):
7676
'Development Status :: 5 - Production/Stable',
7777
'Intended Audience :: Developers',
7878
'Topic :: Software Development :: Build Tools'
79+
'Typing :: Typed',
7980
],
8081

8182
license='Apache 2.0',

src/cmake/__init__.pyi

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from typing import NoReturn
2+
3+
__version__: tuple[int, int, int] | tuple[int, int, int, str, str]
4+
5+
CMAKE_DATA: str
6+
7+
CMAKE_BIN_DIR: str
8+
CMAKE_DOC_DIR: str
9+
CMAKE_SHARE_DIR: str
10+
11+
def _program(name: str, args: Iterator[str]) -> int: ...
12+
13+
def cmake() -> NoReturn: ...
14+
def cpack() -> NoReturn: ...
15+
def ctest() -> NoReturn: ...

src/cmake/py.typed

Whitespace-only changes.

0 commit comments

Comments
 (0)