Skip to content

Commit 83052bb

Browse files
committed
[libclang/python] Enable packaging libclang bindings
1 parent 9f5811e commit 83052bb

File tree

4 files changed

+62
-0
lines changed

4 files changed

+62
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
clang/bindings/python/.git_archival.txt export-subst
2+
13
libcxx/src/**/*.cpp merge=libcxx-reformat
24
libcxx/include/**/*.h merge=libcxx-reformat
35

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node: $Format:%H$
2+
node-date: $Format:%cI$
3+
describe-name: $Format:%(describe:tags=true,match=llvmorg-*[0-9]*)$

clang/bindings/python/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# setuptools_scm auto-generated version file
2+
_version.py
3+
4+
# Byte-compiled / optimized / DLL files
5+
__pycache__/
6+
*.py[cod]
7+
*$py.class
8+
9+
# Distribution / packaging
10+
build/
11+
dist/
12+
*.egg-info/
13+
14+
# Environments
15+
.env
16+
.venv
17+
env/
18+
venv/
19+
ENV/
20+
env.bak/
21+
venv.bak/
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[build-system]
2+
requires = ["setuptools>=42", "setuptools_scm==8.1.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "clang"
7+
description = "libclang python bindings"
8+
readme = {file = "README.txt", content-type = "text/plain"}
9+
10+
license = {text = "Apache-2.0 WITH LLVM-exception"}
11+
authors = [
12+
{ name = "LLVM" }
13+
]
14+
keywords = ["llvm", "clang", "libclang"]
15+
classifiers = [
16+
"Intended Audience :: Developers",
17+
"Development Status :: 5 - Production/Stable",
18+
"Topic :: Software Development :: Compilers",
19+
"Operating System :: OS Independent",
20+
"Programming Language :: Python :: 3",
21+
]
22+
dynamic = ["version"]
23+
24+
[project.urls]
25+
Homepage = "https://clang.llvm.org/"
26+
Download = "https://llvm.org/releases/download.html"
27+
Discussions = "https://discourse.llvm.org/"
28+
"Issue Tracker" = "https://github.com/llvm/llvm-project/issues"
29+
"Source Code" = "https://github.com/llvm/llvm-project/tree/main/clang/bindings/python"
30+
31+
[tool.setuptools_scm]
32+
root = "../../.."
33+
version_file = "clang/_version.py"
34+
version_scheme = "no-guess-dev"
35+
# Regex version capture group gets x.y.z with optional -rcN, -aN, -bN suffixes; -init is just consumed
36+
tag_regex = "^llvmorg-(?P<version>\\d+(?:\\.\\d+)*(?:-rc\\d+)?)(?:.*)$"

0 commit comments

Comments
 (0)