Skip to content
Open
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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
clang/bindings/python/.git_archival.txt export-subst

libcxx/src/**/*.cpp merge=libcxx-reformat
libcxx/include/**/*.h merge=libcxx-reformat

Expand Down
3 changes: 3 additions & 0 deletions clang/bindings/python/.git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=llvmorg-*[0-9]*)$
21 changes: 21 additions & 0 deletions clang/bindings/python/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# setuptools_scm auto-generated version file
_version.py

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
build/
dist/
*.egg-info/

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
43 changes: 43 additions & 0 deletions clang/bindings/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[build-system]
requires = ["hatchling>=1.27", "hatch-vcs>=0.4"]
build-backend = "hatchling.build"

[project]
name = "clang"
description = "clang python bindings"
readme = {file = "README.txt", content-type = "text/plain"}

license = "Apache-2.0 WITH LLVM-exception"
authors = [
{ name = "LLVM" }
]
keywords = ["llvm", "clang", "libclang"]
classifiers = [
"Intended Audience :: Developers",
"Development Status :: 5 - Production/Stable",
"Topic :: Software Development :: Compilers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
]
requires-python = ">=3.10"
dynamic = ["version"]

[project.urls]
Homepage = "https://clang.llvm.org/"
Download = "https://llvm.org/releases/download.html"
Discussions = "https://discourse.llvm.org/"
"Issue Tracker" = "https://github.com/llvm/llvm-project/issues"
"Source Code" = "https://github.com/llvm/llvm-project/tree/main/clang/bindings/python"

[tool.hatch.version]
source = "vcs"
version-scheme = "no-guess-dev"
# regex version capture group gets x.y.z with optional -rcN, -aN, -bN suffixes; -init is just consumed
tag-pattern = "^llvmorg-(?P<version>\\d+(?:\\.\\d+)*(?:-rc\\d+)?)"

[tool.hatch.build.hooks.vcs]
version-file = "clang/_version.py"

[tool.hatch.version.raw-options]
search_parent_directories = true
version_scheme = "no-guess-dev"
Loading