summaryrefslogtreecommitdiff
path: root/dev-python/pygraphviz
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-05-26 00:07:28 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-05-26 00:07:28 +0100
commit994fe442814c4d169bb0f1ee9745604928006b39 (patch)
tree630f10f7414f44018095dd9d3cf9df55852a9d41 /dev-python/pygraphviz
parentf8999218b5a6eafa151e7367030cbfdb69e045ed (diff)
gentoo auto-resync : 26:05:2024 - 00:07:27
Diffstat (limited to 'dev-python/pygraphviz')
-rw-r--r--dev-python/pygraphviz/Manifest5
-rw-r--r--dev-python/pygraphviz/files/pygraphviz-1.12-swig-4.2.0.patch290
-rw-r--r--dev-python/pygraphviz/pygraphviz-1.12-r1.ebuild54
-rw-r--r--dev-python/pygraphviz/pygraphviz-1.13.ebuild2
4 files changed, 2 insertions, 349 deletions
diff --git a/dev-python/pygraphviz/Manifest b/dev-python/pygraphviz/Manifest
index d03db337ffd8..54ae4ba0efcf 100644
--- a/dev-python/pygraphviz/Manifest
+++ b/dev-python/pygraphviz/Manifest
@@ -1,6 +1,3 @@
-AUX pygraphviz-1.12-swig-4.2.0.patch 8922 BLAKE2B 64923595e4dc3839af98ca5705faa4bbe1aa5227d09a5bb4e7b50e8d3309744028a90098f84486fd032fae4c28931fde6923f93697ad65cc2c866078d227431d SHA512 176a31e430b0469ea77bb3cac296933c8d19428d2e893467b7a272093d5184374ffd04bfc56c36a0a183e15518fe2d3bbd540b48f0d4cf3c22d549208808d91f
-DIST pygraphviz-1.12.tar.gz 104941 BLAKE2B 5c2d119c66837d13511ef4756093b159f45ccb2888eb2b86c1d016837059ed34bdc5cb7e69eeff013642d92ec0c2b4a1149316b0baaa742c49a34945fd2563e0 SHA512 2407fdd7de3b2f7f1d9f9e3e3fe0f19c4faad4a72db33a0b4341a01f98eecd4d240079f2d0ea5cf68a5e10236f11fd84e55fd44518611efde2fab7590e3aae90
DIST pygraphviz-1.13.tar.gz 104642 BLAKE2B 6111c1b811d5359da673f9c43719d21e86e93e7e82e5819872fed6f87ebb74efb87dba40b5dac737b93bffcd51683f143528a135a76e3d6f62615593fdc22b88 SHA512 3159fd9fb1226974c3a6289ebc437eed394021a7fc41669e29879fa6fd5e5cb809c808a4016cfb1afaf30dc10e467e8b0fe5c3b71fb9a1f889efcf5ae6ff3597
-EBUILD pygraphviz-1.12-r1.ebuild 1003 BLAKE2B 4ad868f3dcf76bcc89acfa99d624b7cce9fb82738e38518f6cf26ec122a8d06953f101b958195e28996fb0ca4066971aa194791ba12b33910c0d36ae140b3fe9 SHA512 d3673bcb367fcbedcc646bc26c7ea713fd5ab8b8e0484c13d3dcf61280738881f8d5595bd5ddf63d8313d2476ec7062fb8e13571741e73705536bfce7b54660a
-EBUILD pygraphviz-1.13.ebuild 955 BLAKE2B b6a5f4921b2f72fbafb7bb4cb36fc12871e7799e090de4c4159b6ae7f4c887d96d73eda730b035d520c709fc1e7e7fe076c41a640a083bff722e33c4c6431287 SHA512 2df45ea783116e86d506c01345269a08617896adc1df67f2729c32f1e49adca08c84125616732bfe3adfda9199d03dd8274c22c0d3f664ffc8db59acd0a8b4ec
+EBUILD pygraphviz-1.13.ebuild 953 BLAKE2B 50b118295e392e02bb3431a1ee592ff1b677c85ee79b4ed6325aa55ccdbd81b74177a2f21275bc4a5bb509ff3d0ac060869d14ae185af0e196debbac69a645f2 SHA512 958afbf873fb43f61164e77825a2edfbb566633aa7e9d7412a33577e080c71227465307ffa4813c896257efeb1739bc36f7b0fdd53716bf40aff3e80073d8ff5
MISC metadata.xml 682 BLAKE2B 50dc3c55cac525fce3a396c94bdb48eb6e2c0b43636ae53c8ddbce2c9d3f82d8a080d881d4e6ac61ee71f88779c560d38fba3e10424fcd30af0dc80f979df081 SHA512 87e124765948529b7444fb1ad1ae655e18478ca46631a11a6613b289e2ac39600cdc00cc7af82b40694fb1e90c0ccad98be2fb457c5d7f74d5b087a6b3319aff
diff --git a/dev-python/pygraphviz/files/pygraphviz-1.12-swig-4.2.0.patch b/dev-python/pygraphviz/files/pygraphviz-1.12-swig-4.2.0.patch
deleted file mode 100644
index 3daa485044ce..000000000000
--- a/dev-python/pygraphviz/files/pygraphviz-1.12-swig-4.2.0.patch
+++ /dev/null
@@ -1,290 +0,0 @@
-https://bugs.gentoo.org/921637
-https://github.com/swig/swig/issues/2778
-https://github.com/pygraphviz/pygraphviz/commit/6ecae22cc382407652f9d3b57e9da89a3a03043b
-
-From 6ecae22cc382407652f9d3b57e9da89a3a03043b Mon Sep 17 00:00:00 2001
-From: William S Fulton <wsf@fultondesigns.co.uk>
-Date: Fri, 26 Jan 2024 00:52:44 +0000
-Subject: [PATCH] Remove outdated pystrings.swg (#508)
-
-Remove pystring.swg - a very ancient copy from SWIG which does not
-compile when using swig-4.2.0. Instead SWIG's version of pystrings.swg
-that is kept up to date in SWIG is used. SWIG_PYTHON_STRICT_BYTE_CHAR
-needs to be defined in order to maintain the current behaviour of only
-allowing Python 3 byte type instead of Python 3 string type as input.
-
-As the output of swig is in graphviz_wrap.c and is committed to the
-repo, the updates committed in this file (keeping the current swig-4.1.1
-version). A later commit could update it to swig-4.2.0.
-
-Fixes build problems on Fedora where SWIG_Python_str_AsChar no longer exists,
-as reported at https://github.com/swig/swig/issues/2778.
----
- pygraphviz/graphviz.i | 4 ++
- pygraphviz/graphviz_wrap.c | 106 ++++++++++++++++++++++++++++---------
- pystrings.swg | 86 ------------------------------
- 3 files changed, 84 insertions(+), 112 deletions(-)
- delete mode 100644 pystrings.swg
-
-diff --git a/pygraphviz/graphviz.i b/pygraphviz/graphviz.i
-index c63eb2d3..d7c49330 100644
---- a/pygraphviz/graphviz.i
-+++ b/pygraphviz/graphviz.i
-@@ -1,5 +1,9 @@
- %module graphviz
-
-+%begin %{
-+#define SWIG_PYTHON_STRICT_BYTE_CHAR
-+%}
-+
- %{
- #include "graphviz/cgraph.h"
- #include "graphviz/gvc.h"
-diff --git a/pygraphviz/graphviz_wrap.c b/pygraphviz/graphviz_wrap.c
-index 8f4d3a62..cb06da79 100644
---- a/pygraphviz/graphviz_wrap.c
-+++ b/pygraphviz/graphviz_wrap.c
-@@ -6,6 +6,9 @@
- * the SWIG interface file instead.
- * ----------------------------------------------------------------------------- */
-
-+#define SWIG_PYTHON_STRICT_BYTE_CHAR
-+
-+
-
- #define SWIG_VERSION 0x040101
- #define SWIGPYTHON
-@@ -3038,49 +3041,96 @@ SWIGINTERN int
- SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
- {
- #if PY_VERSION_HEX>=0x03000000
-+#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
- if (PyBytes_Check(obj))
- #else
-+ if (PyUnicode_Check(obj))
-+#endif
-+#else
- if (PyString_Check(obj))
- #endif
- {
- char *cstr; Py_ssize_t len;
-+ int ret = SWIG_OK;
- #if PY_VERSION_HEX>=0x03000000
-- PyBytes_AsStringAndSize(obj, &cstr, &len);
-- if(alloc) *alloc = SWIG_NEWOBJ;
-+#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
-+ if (!alloc && cptr) {
-+ /* We can't allow converting without allocation, since the internal
-+ representation of string in Python 3 is UCS-2/UCS-4 but we require
-+ a UTF-8 representation.
-+ TODO(bhy) More detailed explanation */
-+ return SWIG_RuntimeError;
-+ }
-+ obj = PyUnicode_AsUTF8String(obj);
-+ if (!obj)
-+ return SWIG_TypeError;
-+ if (alloc)
-+ *alloc = SWIG_NEWOBJ;
-+#endif
-+ if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
-+ return SWIG_TypeError;
- #else
-- PyString_AsStringAndSize(obj, &cstr, &len);
-+ if (PyString_AsStringAndSize(obj, &cstr, &len) == -1)
-+ return SWIG_TypeError;
- #endif
- if (cptr) {
- if (alloc) {
-- /*
-- In python the user should not be able to modify the inner
-- string representation. To warranty that, if you define
-- SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
-- buffer is always returned.
--
-- The default behavior is just to return the pointer value,
-- so, be careful.
-- */
--#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
-- if (*alloc != SWIG_OLDOBJ)
--#else
-- if (*alloc == SWIG_NEWOBJ)
--#endif
-- {
-- *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
-- *alloc = SWIG_NEWOBJ;
-- }
-- else {
-+ if (*alloc == SWIG_NEWOBJ) {
-+ *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
-+ *alloc = SWIG_NEWOBJ;
-+ } else {
- *cptr = cstr;
- *alloc = SWIG_OLDOBJ;
- }
- } else {
-+#if PY_VERSION_HEX>=0x03000000
-+#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
-+ *cptr = PyBytes_AsString(obj);
-+#else
-+ assert(0); /* Should never reach here with Unicode strings in Python 3 */
-+#endif
-+#else
- *cptr = SWIG_Python_str_AsChar(obj);
-+ if (!*cptr)
-+ ret = SWIG_TypeError;
-+#endif
- }
- }
- if (psize) *psize = len + 1;
-- return SWIG_OK;
-+#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
-+ Py_XDECREF(obj);
-+#endif
-+ return ret;
- } else {
-+#if defined(SWIG_PYTHON_2_UNICODE)
-+#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
-+#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
-+#endif
-+#if PY_VERSION_HEX<0x03000000
-+ if (PyUnicode_Check(obj)) {
-+ char *cstr; Py_ssize_t len;
-+ if (!alloc && cptr) {
-+ return SWIG_RuntimeError;
-+ }
-+ obj = PyUnicode_AsUTF8String(obj);
-+ if (!obj)
-+ return SWIG_TypeError;
-+ if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
-+ if (cptr) {
-+ if (alloc) *alloc = SWIG_NEWOBJ;
-+ *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
-+ }
-+ if (psize) *psize = len + 1;
-+
-+ Py_XDECREF(obj);
-+ return SWIG_OK;
-+ } else {
-+ Py_XDECREF(obj);
-+ }
-+ }
-+#endif
-+#endif
-+
- swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
- if (pchar_descriptor) {
- void* vptr = 0;
-@@ -3311,13 +3361,17 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
- if (carray) {
- if (size > INT_MAX) {
- swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
-- return pchar_descriptor ?
-+ return pchar_descriptor ?
- SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
- } else {
- #if PY_VERSION_HEX >= 0x03000000
-- return PyBytes_FromStringAndSize(carray, (int)(size));
-+#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
-+ return PyBytes_FromStringAndSize(carray, (Py_ssize_t)(size));
-+#else
-+ return PyUnicode_DecodeUTF8(carray, (Py_ssize_t)(size), "surrogateescape");
-+#endif
- #else
-- return PyString_FromStringAndSize(carray, (int)(size));
-+ return PyString_FromStringAndSize(carray, (Py_ssize_t)(size));
- #endif
- }
- } else {
-diff --git a/pystrings.swg b/pystrings.swg
-deleted file mode 100644
-index 7988a353..00000000
---- a/pystrings.swg
-+++ /dev/null
-@@ -1,86 +0,0 @@
--/* Fixed fragments for work with bytes in Python 3. */
--
--%fragment("SWIG_AsCharPtrAndSize","header",fragment="SWIG_pchar_descriptor") {
--SWIGINTERN int
--SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
--{
--%#if PY_VERSION_HEX>=0x03000000
-- if (PyBytes_Check(obj))
--%#else
-- if (PyString_Check(obj))
--%#endif
-- {
-- char *cstr; Py_ssize_t len;
--%#if PY_VERSION_HEX>=0x03000000
-- PyBytes_AsStringAndSize(obj, &cstr, &len);
-- if(alloc) *alloc = SWIG_NEWOBJ;
--%#else
-- PyString_AsStringAndSize(obj, &cstr, &len);
--%#endif
-- if (cptr) {
-- if (alloc) {
-- /*
-- In python the user should not be able to modify the inner
-- string representation. To warranty that, if you define
-- SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
-- buffer is always returned.
--
-- The default behavior is just to return the pointer value,
-- so, be careful.
-- */
--%#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
-- if (*alloc != SWIG_OLDOBJ)
--%#else
-- if (*alloc == SWIG_NEWOBJ)
--%#endif
-- {
-- *cptr = %new_copy_array(cstr, len + 1, char);
-- *alloc = SWIG_NEWOBJ;
-- }
-- else {
-- *cptr = cstr;
-- *alloc = SWIG_OLDOBJ;
-- }
-- } else {
-- *cptr = SWIG_Python_str_AsChar(obj);
-- }
-- }
-- if (psize) *psize = len + 1;
-- return SWIG_OK;
-- } else {
-- swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
-- if (pchar_descriptor) {
-- void* vptr = 0;
-- if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
-- if (cptr) *cptr = (char *) vptr;
-- if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
-- if (alloc) *alloc = SWIG_OLDOBJ;
-- return SWIG_OK;
-- }
-- }
-- }
-- return SWIG_TypeError;
--}
--}
--
--%fragment("SWIG_FromCharPtrAndSize","header",fragment="SWIG_pchar_descriptor") {
--SWIGINTERNINLINE PyObject *
--SWIG_FromCharPtrAndSize(const char* carray, size_t size)
--{
-- if (carray) {
-- if (size > INT_MAX) {
-- swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
-- return pchar_descriptor ?
-- SWIG_InternalNewPointerObj(%const_cast(carray,char *), pchar_descriptor, 0) : SWIG_Py_Void();
-- } else {
--%#if PY_VERSION_HEX >= 0x03000000
-- return PyBytes_FromStringAndSize(carray, %numeric_cast(size,int));
--%#else
-- return PyString_FromStringAndSize(carray, %numeric_cast(size,int));
--%#endif
-- }
-- } else {
-- return SWIG_Py_Void();
-- }
--}
--}
-
diff --git a/dev-python/pygraphviz/pygraphviz-1.12-r1.ebuild b/dev-python/pygraphviz/pygraphviz-1.12-r1.ebuild
deleted file mode 100644
index 6a126f81d6bd..000000000000
--- a/dev-python/pygraphviz/pygraphviz-1.12-r1.ebuild
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} )
-
-inherit distutils-r1 pypi
-
-DESCRIPTION="Python wrapper for the Graphviz Agraph data structure"
-HOMEPAGE="
- https://pygraphviz.github.io/
- https://github.com/pygraphviz/pygraphviz/
- https://pypi.org/project/pygraphviz/
-"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~riscv x86 ~x86-linux ~ppc-macos ~x64-macos"
-
-# Note: only C API of graphviz is used, PYTHON_USEDEP unnecessary.
-DEPEND="
- media-gfx/graphviz
-"
-RDEPEND="
- ${DEPEND}
-"
-BDEPEND="
- dev-lang/swig:0
-"
-
-distutils_enable_tests pytest
-
-PATCHES=(
- "${FILESDIR}"/${P}-swig-4.2.0.patch
-)
-
-src_configure() {
- swig -python pygraphviz/graphviz.i || die
-}
-
-python_test() {
- cd "${BUILD_DIR}"/install || die
- epytest
-}
-
-python_install_all() {
- dodoc -r examples
- docompress -x /usr/share/doc/${PF}/examples
-
- distutils-r1_python_install_all
-}
diff --git a/dev-python/pygraphviz/pygraphviz-1.13.ebuild b/dev-python/pygraphviz/pygraphviz-1.13.ebuild
index 5a9b1b4ec3c2..e58d7fbd5c79 100644
--- a/dev-python/pygraphviz/pygraphviz-1.13.ebuild
+++ b/dev-python/pygraphviz/pygraphviz-1.13.ebuild
@@ -18,7 +18,7 @@ HOMEPAGE="
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86 ~x86-linux ~ppc-macos ~x64-macos"
+KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~riscv x86 ~x86-linux ~ppc-macos ~x64-macos"
# Note: only C API of graphviz is used, PYTHON_USEDEP unnecessary.
DEPEND="