[clang] [llvm] [libclang/python] Enable packaging libclang bindings (PR #125806)
Ryan Mast via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 6 05:47:58 PST 2025
================
@@ -0,0 +1,36 @@
+[build-system]
+requires = ["setuptools>=42", "setuptools_scm==8.1.0"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "clang"
+description = "libclang python bindings"
+readme = {file = "README.txt", content-type = "text/plain"}
+
+license = {text = "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",
+]
+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.setuptools_scm]
+root = "../../.."
+version_file = "clang/_version.py"
+version_scheme = "no-guess-dev"
+# Regex version capture group gets x.y.z with optional -rcN, -aN, -bN suffixes; -init is just consumed
+tag_regex = "^llvmorg-(?P<version>\\d+(?:\\.\\d+)*(?:-(?:rc|a|b)\\d+)?)(?:.*)$"
----------------
nightlark wrote:
They are the two other pre-release version specifiers defined by in PEP 440 (https://peps.python.org/pep-0440/#pre-releases), with a `-` separator between the segments (https://peps.python.org/pep-0440/#pre-release-separators). If llvm isn’t likely to ever use those for future pre-releases I can remove them from the regex.
https://github.com/llvm/llvm-project/pull/125806
More information about the cfe-commits
mailing list