summaryrefslogtreecommitdiff
path: root/dev-python/pygccxml
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-04-16 12:04:26 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-04-16 12:04:26 +0100
commitb92911550490e2da121ec4b02d3cf60a2d31a17d (patch)
treedc29e698da3b00d42ead3796b35416159e83d57a /dev-python/pygccxml
parent7fa8a1e3f149eea4c844c47cfe26136ed7614c58 (diff)
gentoo auto-resync : 16:04:2024 - 12:04:26
Diffstat (limited to 'dev-python/pygccxml')
-rw-r--r--dev-python/pygccxml/Manifest5
-rw-r--r--dev-python/pygccxml/files/pygccxml-2.5.0-which.patch68
-rw-r--r--dev-python/pygccxml/metadata.xml3
-rw-r--r--dev-python/pygccxml/pygccxml-2.5.0.ebuild49
4 files changed, 124 insertions, 1 deletions
diff --git a/dev-python/pygccxml/Manifest b/dev-python/pygccxml/Manifest
index d01fb64941e2..27ebd7f2659b 100644
--- a/dev-python/pygccxml/Manifest
+++ b/dev-python/pygccxml/Manifest
@@ -1,5 +1,8 @@
AUX pygccxml-2.4.0-doc.patch 798 BLAKE2B f062375f40ada000fd266f50d6fdf3ab70ef744c2dfdf29e4d80d1a2008fd910e09053f6cff0ee9b7fd0bd7b263331ca40a1349b821e2203a16a04032ada5a94 SHA512 357b35fa379f90ce56a391b54ff9b4550845747c79fd5c0f3b0a331adfbf5e157c7b9e2a0a7ea2b5929a4074e4ff02b7553d8131961c86b1993fbb627179c729
AUX pygccxml-2.4.0-pyproject.patch 283 BLAKE2B a25ad74f57a6cdebdb83bc49b1ec833a12362be53781f4f72679ac2eeeec3a6649a556af9b8efb3c480d4bc8a23672e4c165ed2c8c39d90cbc8bc980f9834eec SHA512 87b4b24669dbf70bd14276e551b21c0f142ad8661b579a6bfebe9342c716dd1dfa0eb47f7906fc160effa8a9117be0af312b7aed3a36e6f7a3fe0a54a1784c79
+AUX pygccxml-2.5.0-which.patch 2637 BLAKE2B 859f7418d5c427e27a925993c209ff6daff667abf0822eea8baf49a5ad5b349ccfb3083e765e6aa893019b402b7464c46ca50f7e484ded6f84c4d85c17955c4b SHA512 48d1bb31516afcefbb80dc04a47166bf9980da1aee9c5e434c7d45928cfee7abcaa0e7cc64752de78991144351c90b4c6160a42aa4d0639a791162467444c056
DIST pygccxml-2.4.0.gh.tar.gz 3165189 BLAKE2B 855b0b6313be29e7719abe4cc6e654904657c11bfd7310d647227ce9d7760821eeb348dcd9892afbcc3d467db96daaf3010e92803fe28962db9a255cf81eae46 SHA512 48bf4887344c68d0a93a3908cc0a744f3d6a74dce92be88527e85cf7ba1a46f88560730dce0b858f31523cada836aad40461de935c5c2a041de0fa2ae5e38c30
+DIST pygccxml-2.5.0.gh.tar.gz 3163862 BLAKE2B 2a61474acab7e7a21b21bc7131a9b9aae2a318d3b761c9a3865055146331891e5fb2041a9136bd8816e60a4dc76a39a22d5f5632f22336341667eee537521a42 SHA512 499be7383ac9817c5620f7f0b2e6fdb9a6f5d934cc54a2ef9864877a2a7d896997ab5bc2e8b0c3c87df1ac7e4a384d3c8cbcc87f9496125502c97766df57b003
EBUILD pygccxml-2.4.0.ebuild 792 BLAKE2B f0fde6f95674c976d421039dcace600d842655305b14968aea9cc8cc3336e0d7ecd83e254249d2657932b8b995d13af9e897086acd326b067bdc24836e20dd07 SHA512 7f2329d8289865fad19b57012506d20c20b7d4cd18382fb53998e59dc1e84b7cc146b4cf658592b46653ce45c47dbf5661b06fb1071239ac88c007ede464a497
-MISC metadata.xml 471 BLAKE2B 7d50e5a82bc02e898dcce546775fb4b4d71277097489bc3765eface8cdea1cfa7707a1e60b33e5b5f425ef72ef4b17a7d477df38ba65e8defb4c608cd627d679 SHA512 2b87abc970fe6b3838d3a72e849f6ff84f3c23f4257377d0426d5e8853512ad2fbbb4dae36fe7be7b02664ab64b0eb87e92a42e3d84abc54540aef1fcfc67581
+EBUILD pygccxml-2.5.0.ebuild 989 BLAKE2B 8b3b10cbf9a7b397093084cc830eb74f82b5bba520317412ff89cd44f36d3de6f1b40b875f9451008fbfed22ea18f91935cce4709ab14dc1f6839d4d57e8a4b1 SHA512 fb055b260b8fe6e6b21e3f532debe578279ccc8bebe59a5b79faf34179f3f105fcab830b0cb181228dad18a0780fcfa7ab7a23b21de9706990d5ac6d7d945bdd
+MISC metadata.xml 554 BLAKE2B 27017dc7cae6aacbe62f9ba64896e0a247371844b0baab86c5c1b1673771b888e2043a4486863857b565ed18a7928c500c07b6c6dc4f1f50494e680367928aca SHA512 eb46746c8d9b3341d8057a457785ad0c3b34ba26ca941496bc5c37f767c7472a2ed2bb5aafe06f5b677710f969b9a9229d8c24cd3dcdd30624168765bc89e3b7
diff --git a/dev-python/pygccxml/files/pygccxml-2.5.0-which.patch b/dev-python/pygccxml/files/pygccxml-2.5.0-which.patch
new file mode 100644
index 000000000000..52ac56ed48f0
--- /dev/null
+++ b/dev-python/pygccxml/files/pygccxml-2.5.0-which.patch
@@ -0,0 +1,68 @@
+From 08f53536a0e76bab000df2837af4a13f06bbd4a7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Mon, 15 Apr 2024 15:50:39 +0200
+Subject: [PATCH] Use `shutil.which()` to get compiler path
+
+Remove the `__get_first_compiler_in_path()` function that used
+`which(1)` / `where` program to get the compiler path, with built-in
+`shutil.which()`. This fixes pygccxml on systems where `which(1)`
+is no longer present (it is not a standard POSIX tool, and Linux
+distributions are working towards making it optional).
+---
+ src/pygccxml/parser/config.py | 28 +++++++---------------------
+ 1 file changed, 7 insertions(+), 21 deletions(-)
+
+diff --git a/src/pygccxml/parser/config.py b/src/pygccxml/parser/config.py
+index 1032b54e..4fe4a6a0 100644
+--- a/src/pygccxml/parser/config.py
++++ b/src/pygccxml/parser/config.py
+@@ -11,6 +11,7 @@
+ import os
+ import copy
+ import platform
++import shutil
+ import subprocess
+ import warnings
+ # In py3, ConfigParser was renamed to the more-standard configparser.
+@@ -451,35 +452,20 @@ def create_compiler_path(xml_generator, compiler_path):
+ if xml_generator == 'castxml' and compiler_path is None:
+ if platform.system() == 'Windows':
+ # Look for msvc
+- compiler_path = __get_first_compiler_in_path('where', 'cl')
++ compiler_path = shutil.which('cl')
+ # No msvc found; look for mingw
+- if compiler_path == '':
+- compiler_path = __get_first_compiler_in_path('where', 'mingw')
++ if compiler_path is None:
++ compiler_path = shutil.which('mingw')
+ else:
+ # OS X or Linux
+ # Look for clang first, then gcc
+- compiler_path = __get_first_compiler_in_path('which', 'clang++')
++ compiler_path = shutil.which('clang++')
+ # No clang found; use gcc
+- if compiler_path == '':
+- compiler_path = __get_first_compiler_in_path('which', 'c++')
+-
+- if compiler_path == "":
+- compiler_path = None
++ if compiler_path is None:
++ compiler_path = shutil.which('c++')
+
+ return compiler_path
+
+
+-def __get_first_compiler_in_path(command, compiler_name):
+- p = subprocess.Popen(
+- [command, compiler_name],
+- stdout=subprocess.PIPE,
+- stderr=subprocess.PIPE)
+- path = p.stdout.read().decode("utf-8").rstrip().split("\r\n")[0].rstrip()
+- p.wait()
+- p.stdout.close()
+- p.stderr.close()
+- return path
+-
+-
+ if __name__ == '__main__':
+ print(load_xml_generator_configuration('xml_generator.cfg').__dict__)
diff --git a/dev-python/pygccxml/metadata.xml b/dev-python/pygccxml/metadata.xml
index e8cf9b64df61..a060648fb7da 100644
--- a/dev-python/pygccxml/metadata.xml
+++ b/dev-python/pygccxml/metadata.xml
@@ -8,6 +8,9 @@
<maintainer type="project">
<email>radio@gentoo.org</email>
</maintainer>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ </maintainer>
<upstream>
<remote-id type="github">CastXML/pygccxml</remote-id>
<remote-id type="pypi">pygccxml</remote-id>
diff --git a/dev-python/pygccxml/pygccxml-2.5.0.ebuild b/dev-python/pygccxml/pygccxml-2.5.0.ebuild
new file mode 100644
index 000000000000..3a2e39187e16
--- /dev/null
+++ b/dev-python/pygccxml/pygccxml-2.5.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1
+
+DESCRIPTION="A specialized XML reader to navigate C++ declarations"
+HOMEPAGE="
+ https://github.com/CastXML/pygccxml/
+ https://pypi.org/project/pygccxml/
+"
+SRC_URI="
+ https://github.com/CastXML/pygccxml/archive/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="Boost-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~riscv ~x86"
+
+DEPEND="
+ ${PYTHON_DEPS}
+ dev-libs/castxml
+"
+RDEPEND="
+ ${DEPEND}
+"
+
+distutils_enable_tests pytest
+distutils_enable_sphinx docs dev-python/sphinx-rtd-theme
+
+EPYTEST_DESELECT=(
+ # TODO; too new LLVM? upstream tests against LLVM 13
+ unittests/test_overrides.py::Test::test
+)
+
+python_prepare_all() {
+ local PATCHES=(
+ "${FILESDIR}/${PN}-2.4.0-doc.patch"
+ # https://github.com/CastXML/pygccxml/pull/179
+ "${FILESDIR}/${P}-which.patch"
+ )
+
+ distutils-r1_python_prepare_all
+}