summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-12-15 18:49:44 +0100
committerMichał Górny <mgorny@gentoo.org>2023-12-15 18:51:03 +0100
commitc18f74a21bd3926929278ec403d00943decd0030 (patch)
treef989abab9aacbe0a9d6b7caf3674772f237915e1
parentsys-devel/clang: Add 18.0.0_pre20231215 snapshot (diff)
downloadgentoo-c18f74a2.tar.gz
gentoo-c18f74a2.tar.bz2
gentoo-c18f74a2.zip
dev-python/clang-python: Add 18.0.0_pre20231215 snapshot
Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-python/clang-python/Manifest1
-rw-r--r--dev-python/clang-python/clang-python-18.0.0_pre20231215.ebuild53
2 files changed, 54 insertions, 0 deletions
diff --git a/dev-python/clang-python/Manifest b/dev-python/clang-python/Manifest
index 1dff6636ab84..bbf3c61e611c 100644
--- a/dev-python/clang-python/Manifest
+++ b/dev-python/clang-python/Manifest
@@ -8,3 +8,4 @@ DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e06541
DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340
DIST llvm-project-5237193b87721134541f228e28edfd544a9c8ac8.tar.gz 201404340 BLAKE2B f028b8b100721202007e3106d8ee91bcf2ac90588f9268ec835dc4ea3941363d4b796338146c65d1a9e88957d18738030f713b3fed770616c79cb40043e706db SHA512 40a4d4f99f1a690a0f8737261aeeaa61af6124eeadcb6bab5c3828e88b36b8cce42a8caee6d3f01e675047c59b62210de017d207e341f680eff97758f798ad45
DIST llvm-project-6a4489a73337907d52e7eaf3716f3de9008e6e53.tar.gz 201703120 BLAKE2B 7de783df15ff30ab85aad2f02a5a043d09b18dd7b212c19e21b045870497e2b17a53527523cd533c4ef61b22d605026a9322d2f8d02f0d4f76ed26ab693b788c SHA512 ffc31d7037255d608717faff84e858d63b37abed5659d66599864ae44ed00fc5902e9851eb1b8c848b500623681ef5782b39ad2bf8bcf96ac4f35032efde1490
+DIST llvm-project-d37ced88809cb4d2df57ec80887b3f8801ca719b.tar.gz 203826420 BLAKE2B 58448df837f2119720a36b837d0e4f2b2fc00da5658706b193b9d2d180cf0f6c5eb79a9cc0fa9d94310996a95210115a5a46371bd8537f16e105adea14a72399 SHA512 1348e5bf736acaeebf0ae0f613973e6c2d439d360c2272bb4ab112e579b12c297970bb765fd774c768aa55a922c93048b1d8ae6bfd636b241fa86f9427cc2069
diff --git a/dev-python/clang-python/clang-python-18.0.0_pre20231215.ebuild b/dev-python/clang-python/clang-python-18.0.0_pre20231215.ebuild
new file mode 100644
index 000000000000..e1394f43bcd1
--- /dev/null
+++ b/dev-python/clang-python/clang-python-18.0.0_pre20231215.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit llvm.org python-r1
+
+DESCRIPTION="Python bindings for sys-devel/clang"
+HOMEPAGE="https://llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
+SLOT="0"
+IUSE="test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# The module is opening libclang.so directly, and doing some blasphemy
+# on top of it.
+DEPEND="
+ >=sys-devel/clang-${PV}:*
+ !sys-devel/llvm:0[clang(-),python(-)]
+ !sys-devel/clang:0[python(-)]
+"
+RDEPEND="
+ ${DEPEND}
+ ${PYTHON_DEPS}
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ test? (
+ sys-devel/clang:${LLVM_MAJOR}
+ )
+"
+
+LLVM_COMPONENTS=( clang/bindings/python )
+llvm.org_set_globals
+
+python_test() {
+ # tests rely on results from a specific clang version, so override
+ # the search path
+ local -x CLANG_LIBRARY_PATH=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)
+ local -x CLANG_NO_DEFAULT_CONFIG=1
+ "${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}"
+}
+
+src_test() {
+ python_foreach_impl python_test
+}
+
+src_install() {
+ python_foreach_impl python_domodule clang
+}