Skip to content

Commit f55e8e5

Browse files
authored
feat: add typing info (#126)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent ac522ca commit f55e8e5

File tree

5 files changed

+19
-8
lines changed

5 files changed

+19
-8
lines changed

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ recursive-exclude Ninja-src *
1010

1111
include versioneer.py
1212
include src/ninja/_version.py
13+
include src/ninja/__init__.pyi
14+
include src/ninja/py.typed

pyproject.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
[build-system]
22
requires = [
33
"setuptools>=42",
4-
"wheel",
54
"scikit-build>=0.12",
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",
11+
'pipx install -f --pip-args="-c {project}/constraints-ci.txt" cmake',
12+
'cmake --version',
1413
]
1514
before-build = "pip install -r requirements-repair.txt"
1615
repair-wheel-command = "python scripts/repair_wheel.py -w {dest_dir} {wheel}"
@@ -26,12 +25,11 @@ MACOSX_DEPLOYMENT_TARGET = "10.9"
2625

2726
[tool.cibuildwheel.windows]
2827
before-all = [
29-
"pipx install -f --pip-args=\"-c {project}/constraints-ci.txt\" cmake",
30-
"cmake --version",
31-
"pipx install -f --pip-args=\"-c {project}/constraints-ci.txt\" ninja",
32-
"ninja --version",
28+
'pipx install -f --pip-args="-c {project}/constraints-ci.txt" cmake',
29+
'cmake --version',
30+
'pipx install -f --pip-args="-c {project}/constraints-ci.txt" ninja',
31+
'ninja --version',
3332
]
3433

3534
[tool.isort]
3635
profile = "black"
37-
multi_line_output = 3

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def parse_requirements(filename):
6868
'Development Status :: 5 - Production/Stable',
6969
'Intended Audience :: Developers',
7070
'Topic :: Software Development :: Build Tools'
71+
'Typing :: Typed',
7172
],
7273

7374
license='Apache 2.0',

src/ninja/__init__.pyi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from typing import Iterable, NoReturn
2+
3+
__version__ = tuple[int, int, int] | tuple[int, int, int, int | str]
4+
5+
DATA = str
6+
BIN_DIR = str
7+
8+
def _program(name: str, args: Iterable[str]) -> int: ...
9+
10+
def ninja() -> NoReturn: ...

src/ninja/py.typed

Whitespace-only changes.

0 commit comments

Comments
 (0)