Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
src/ninja/_version.py export-subst
.git_archival.txt export-subst
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,9 @@ docs/_build
.idea/*
*.swp
*~

# Output from cibuildwheel
/wheelhouse

# Version
_version.py
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[build-system]
requires = [
"setuptools >=42",
"setuptools-scm[toml]",
"scikit-build",
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
write_to = "src/ninja/_version.py"

[tool.cibuildwheel]
build = "cp39-*"
build-verbosity = 1
Expand Down
5 changes: 0 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
# is already installed (c.f. https://github.com/scikit-build/cmake-python-distributions/issues/171)
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))

import versioneer # noqa: E402

with open('README.rst', 'r') as fp:
readme = fp.read()

Expand All @@ -34,9 +32,6 @@ def parse_requirements(filename):
setup(
name='ninja',

version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),

author='Jean-Christophe Fillion-Robin',
author_email='scikit-build@googlegroups.com',

Expand Down
10 changes: 7 additions & 3 deletions src/ninja/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
import subprocess
import sys

from ._version import get_versions
from ._version import version as __version__

__all__ = ["__version__", "DATA", "BIN_DIR", "ninja"]


def __dir__(self):
return __all__

__version__ = get_versions()['version']
del get_versions

try:
from .ninja_syntax import Writer, escape, expand # noqa: F401
Expand Down
Loading