public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygraphviz/, dev-python/pygraphviz/files/
@ 2020-02-05  5:50 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2020-02-05  5:50 UTC (permalink / raw
  To: gentoo-commits

commit:     a92b281140c971deef2141281279c5acca242eb5
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 05:34:27 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Feb  5 05:50:18 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a92b2811

dev-python/pygraphviz: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pygraphviz/Manifest                     |  2 -
 .../pygraphviz/files/pygraphviz-1.0-setup.py.patch | 33 ---------------
 .../files/pygraphviz-1.2-avoid_tests.patch         | 47 ---------------------
 .../pygraphviz/files/pygraphviz-1.3.1-docs.patch   | 29 -------------
 .../pygraphviz/files/pygraphviz-1.3.1-swig-3.patch | 23 ----------
 dev-python/pygraphviz/pygraphviz-1.2.ebuild        | 39 -----------------
 dev-python/pygraphviz/pygraphviz-1.3.1.ebuild      | 49 ----------------------
 7 files changed, 222 deletions(-)

diff --git a/dev-python/pygraphviz/Manifest b/dev-python/pygraphviz/Manifest
index e7eaf2d6dc0..2301c1c36ac 100644
--- a/dev-python/pygraphviz/Manifest
+++ b/dev-python/pygraphviz/Manifest
@@ -1,3 +1 @@
-DIST pygraphviz-1.2.tar.gz 90913 BLAKE2B 2031b3d1366ce038fc10a1ed632bae9ae67789eae1c45e9e9eb418cf8e5729d47baed96508f52e962aa0138a1fa6231a50bbba2049435f4af959ef467eaa7454 SHA512 e477af635594c3ba1aa6fa499bc5e60df14e76616a1a777f648e2e96d3953dd3d0b3bae4a92275dac2f7466276cf526ecb8b6a63fd3fbad26ee24b67d76ecfa3
-DIST pygraphviz-1.3.1.tar.gz 103336 BLAKE2B 267c85ca4639a2f0ad8c06d36eaa1f2026c6afafe357be23ea4c108b7953aedac2f397bf262a68f336385a5810d77bec9d200bf86da3d101b4d402dcc2d77e1f SHA512 e1957d7daf7ae9e60873cb6f23ac19a3320b4b10579ab24a2307beb558dad11a8e82e1da528799165b761d944efb4860b7296e3218846f7885f715c396a8e3dc
 DIST pygraphviz-1.5.zip 117810 BLAKE2B e9139d6b8e01cacb3135b1ccd2fa8624c041b7a04848f66c7668c5acf55cf66380ab9f05193b1bb240133f0c01a21915e2314807fcde23246c287d22efb9450a SHA512 6d3df6642a7e23ecb6b687761480b80a3ee5886508ef50b81697041425be7d09d623bf46990c5cea3ef36817a28d9e5c2905eb32267296f55524fdedb2199ea2

diff --git a/dev-python/pygraphviz/files/pygraphviz-1.0-setup.py.patch b/dev-python/pygraphviz/files/pygraphviz-1.0-setup.py.patch
deleted file mode 100644
index 13eb0f213ce..00000000000
--- a/dev-python/pygraphviz/files/pygraphviz-1.0-setup.py.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- setup_egg.py
-+++ setup_egg.py
-@@ -46,7 +46,6 @@
-         download_url     = release.download_url,
-         classifiers      = release.classifiers,
-         packages         = packages,
--        data_files       = data,
-         ext_modules      = extension,
-         package_data     = package_data,
-         install_requires=['setuptools'],
---- setup.py
-+++ setup.py
-@@ -98,12 +98,6 @@
- sys.path.pop(0)
- 
- packages = ["pygraphviz","pygraphviz.tests"]
--docdirbase  = 'share/doc/pygraphviz-%s' % release.version
--data = [(docdirbase, glob("*.txt")),
--        (os.path.join(docdirbase, 'examples'),glob("examples/*.py")),
--        (os.path.join(docdirbase, 'examples'),glob("examples/*.dat")),
--        (os.path.join(docdirbase, 'examples'),glob("examples/*.dat.gz")),
--        ]
- extension = [Extension("pygraphviz._graphviz",
-                       ["pygraphviz/graphviz_wrap.c"],
-                       include_dirs=include_dirs,
-@@ -130,7 +124,6 @@
-         download_url     = release.download_url,
-         classifiers      = release.classifiers,
-         packages         = packages,
--        data_files       = data,
-         ext_modules      = extension,
-         package_data     = package_data
-       )

diff --git a/dev-python/pygraphviz/files/pygraphviz-1.2-avoid_tests.patch b/dev-python/pygraphviz/files/pygraphviz-1.2-avoid_tests.patch
deleted file mode 100644
index d444ee3d2df..00000000000
--- a/dev-python/pygraphviz/files/pygraphviz-1.2-avoid_tests.patch
+++ /dev/null
@@ -1,47 +0,0 @@
- pygraphviz/__init__.py |  2 --
- pygraphviz/agraph.py   | 25 -------------------------
- 2 files changed, 27 deletions(-)
-
-diff --git a/pygraphviz/__init__.py b/pygraphviz/__init__.py
-index a807801..33f727e 100644
---- a/pygraphviz/__init__.py
-+++ b/pygraphviz/__init__.py
-@@ -68,5 +68,3 @@ def version():
-     neato=_get_prog('neato')
-     os.system(neato+' -V')
- 
--# import tests: run as pygraphviz.test()
--from tests import run as test
-diff --git a/pygraphviz/agraph.py b/pygraphviz/agraph.py
-index c9f735b..90a661e 100644
---- a/pygraphviz/agraph.py
-+++ b/pygraphviz/agraph.py
-@@ -1771,28 +1771,3 @@ class ItemAttribute(Attribute):
-                        value.decode(self.encoding))
-             except KeyError: # gv.agxget returned KeyError, skip
-                 continue
--
--
--
--def _test_suite():
--    import doctest
--    suite = doctest.DocFileSuite('tests/graph.txt',
--                                 'tests/attributes.txt',
--                                 'tests/layout_draw.txt',
--                                 'tests/subgraph.txt',
--                                 package='pygraphviz')
--    doctest.testmod() # test docstrings in module
--    return suite
--
--
--if __name__ == "__main__":
--    import os
--    import sys
--    import unittest
--    if sys.version_info[:2] < (2, 4):
--        print "Python version 2.4 or later required for tests (%d.%d detected)." %  sys.version_info[:2]
--        sys.exit(-1)
--    # directory of package (relative to this)
--    nxbase=sys.path[0]+os.sep+os.pardir
--    sys.path.insert(0,nxbase) # prepend to search path
--    unittest.TextTestRunner().run(_test_suite())

diff --git a/dev-python/pygraphviz/files/pygraphviz-1.3.1-docs.patch b/dev-python/pygraphviz/files/pygraphviz-1.3.1-docs.patch
deleted file mode 100644
index aed5c9075b8..00000000000
--- a/dev-python/pygraphviz/files/pygraphviz-1.3.1-docs.patch
+++ /dev/null
@@ -1,29 +0,0 @@
- setup.py | 8 --------
- 1 file changed, 8 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index fc0a96f..98b7f58 100644
---- a/setup.py
-+++ b/setup.py
-@@ -36,13 +36,6 @@ release.write_versionfile()
- sys.path.pop(0)
- 
- packages = ["pygraphviz", "pygraphviz.tests"]
--docdirbase = 'share/doc/pygraphviz-%s' % release.version
--data = [
--    (docdirbase, glob("*.txt")),
--    (os.path.join(docdirbase, 'examples'), glob("examples/*.py")),
--    (os.path.join(docdirbase, 'examples'), glob("examples/*.dat")),
--    (os.path.join(docdirbase, 'examples'), glob("examples/*.dat.gz")),
--]
- package_data = {'': ['*.txt'], }
- 
- if __name__ == "__main__":
-@@ -75,7 +68,6 @@ if __name__ == "__main__":
-         download_url=release.download_url,
-         classifiers=release.classifiers,
-         packages=packages,
--        data_files=data,
-         ext_modules=extension,
-         cmdclass={
-             'install': AddExtensionInstallCommand,

diff --git a/dev-python/pygraphviz/files/pygraphviz-1.3.1-swig-3.patch b/dev-python/pygraphviz/files/pygraphviz-1.3.1-swig-3.patch
deleted file mode 100644
index 912667e7f5a..00000000000
--- a/dev-python/pygraphviz/files/pygraphviz-1.3.1-swig-3.patch
+++ /dev/null
@@ -1,23 +0,0 @@
- pygraphviz/graphviz.i | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/pygraphviz/graphviz.i b/pygraphviz/graphviz.i
-index 0d9b43b..5f1f6b0 100644
---- a/pygraphviz/graphviz.i
-+++ b/pygraphviz/graphviz.i
-@@ -1,9 +1,9 @@
--#    Copyright (C) 2004-2006 by 
--#    Aric Hagberg <hagberg@lanl.gov>
--#    Dan Schult <dschult@colgate.edu>
--#    Manos Renieris, http://www.cs.brown.edu/~er/
--#    Distributed with BSD license.     
--#    All rights reserved, see LICENSE for details.
-+//    Copyright (C) 2004-2006 by 
-+//    Aric Hagberg <hagberg@lanl.gov>
-+//    Dan Schult <dschult@colgate.edu>
-+//    Manos Renieris, http://www.cs.brown.edu/~er/
-+//    Distributed with BSD license.     
-+//    All rights reserved, see LICENSE for details.
- 
- %module graphviz
- 

diff --git a/dev-python/pygraphviz/pygraphviz-1.2.ebuild b/dev-python/pygraphviz/pygraphviz-1.2.ebuild
deleted file mode 100644
index c4a7bc3f784..00000000000
--- a/dev-python/pygraphviz/pygraphviz-1.2.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit distutils-r1
-
-DESCRIPTION="Python wrapper for the Graphviz Agraph data structure"
-HOMEPAGE="http://networkx.lanl.gov/pygraphviz/ https://pypi.org/project/pygraphviz/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ppc x86 ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="examples"
-
-# Note: only C API of graphviz is used, PYTHON_USEDEP unnecessary.
-RDEPEND="media-gfx/graphviz"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-1.0-setup.py.patch
-	"${FILESDIR}"/${P}-avoid_tests.patch
-)
-
-python_test() {
-	PYTHONPATH=${PYTHONPATH}:${BUILD_DIR}/lib/pygraphviz \
-	"${PYTHON}" \
-		-c "import pygraphviz.tests; pygraphviz.tests.run()" \
-		|| die "Tests fail with ${EPYTHON}"
-}
-
-python_install_all() {
-	use examples && local EXAMPLES=( examples/. )
-
-	distutils-r1_python_install_all
-}

diff --git a/dev-python/pygraphviz/pygraphviz-1.3.1.ebuild b/dev-python/pygraphviz/pygraphviz-1.3.1.ebuild
deleted file mode 100644
index 174617915ba..00000000000
--- a/dev-python/pygraphviz/pygraphviz-1.3.1.ebuild
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 python3_6 )
-
-inherit distutils-r1
-
-DESCRIPTION="Python wrapper for the Graphviz Agraph data structure"
-HOMEPAGE="http://pygraphviz.github.io/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~arm64 ~ppc x86 ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-IUSE="examples test"
-RESTRICT="!test? ( test )"
-
-# Note: only C API of graphviz is used, PYTHON_USEDEP unnecessary.
-RDEPEND="media-gfx/graphviz"
-DEPEND="${RDEPEND}
-	dev-lang/swig:0
-	test? (
-		dev-python/doctest-ignore-unicode[${PYTHON_USEDEP}]
-		dev-python/nose[${PYTHON_USEDEP}]
-	)
-"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-docs.patch
-	"${FILESDIR}"/${P}-swig-3.patch
-)
-
-python_prepare_all() {
-	distutils-r1_python_prepare_all
-	swig -python pygraphviz/graphviz.i || die
-}
-
-python_test() {
-	PYTHONPATH=${PYTHONPATH}:${BUILD_DIR}/lib/pygraphviz \
-		nosetests -c setup.cfg -x -v || die
-}
-
-python_install_all() {
-	use examples && local EXAMPLES=( examples/. )
-
-	distutils-r1_python_install_all
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygraphviz/, dev-python/pygraphviz/files/
@ 2021-08-18 17:08 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2021-08-18 17:08 UTC (permalink / raw
  To: gentoo-commits

commit:     966ae644bed7f1b41aec28ace0080f4e65b59727
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 18 17:07:10 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Aug 18 17:07:10 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=966ae644

dev-python/pygraphviz: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pygraphviz/Manifest                     |  1 -
 .../pygraphviz/files/pygraphviz-1.5-docs.patch     | 29 --------------
 dev-python/pygraphviz/pygraphviz-1.6.ebuild        | 44 ----------------------
 3 files changed, 74 deletions(-)

diff --git a/dev-python/pygraphviz/Manifest b/dev-python/pygraphviz/Manifest
index ca7cd8c5394..63c57d24a88 100644
--- a/dev-python/pygraphviz/Manifest
+++ b/dev-python/pygraphviz/Manifest
@@ -1,2 +1 @@
-DIST pygraphviz-1.6.zip 117043 BLAKE2B a6c4f28d67ff67bf3fb69869adaad23855c6d702663cfea648b2072b8a5095caaa3d9cfcc864354a362cc6c4c2c6e4a15d5977c58c6af5e22b02f8cea8f7e877 SHA512 6dd389b3fd8c46fd5c8a5a450623f2fe080f720bcf0812618549d092cf917b56ef515f4235fdb89123ece422c6e295705bb08076a3d3e9b193955fcda624acb3
 DIST pygraphviz-1.7.zip 118754 BLAKE2B 36507fc862bec45a33bee3f89e7593a15639e7d98067e1c4ddf917558b7bc037b9d7607f7f017ad5980ba0e6805e63f05464efe8fd416ef70cb95709151714e3 SHA512 09438931d1930a70f7da94b0a12b449c0836ad707c6c8abed49bae0db162c136002d170398ed02dc56a5029269490ce3156d2d4b0f30602a11165bc0038998ea

diff --git a/dev-python/pygraphviz/files/pygraphviz-1.5-docs.patch b/dev-python/pygraphviz/files/pygraphviz-1.5-docs.patch
deleted file mode 100644
index aed5c9075b8..00000000000
--- a/dev-python/pygraphviz/files/pygraphviz-1.5-docs.patch
+++ /dev/null
@@ -1,29 +0,0 @@
- setup.py | 8 --------
- 1 file changed, 8 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index fc0a96f..98b7f58 100644
---- a/setup.py
-+++ b/setup.py
-@@ -36,13 +36,6 @@ release.write_versionfile()
- sys.path.pop(0)
- 
- packages = ["pygraphviz", "pygraphviz.tests"]
--docdirbase = 'share/doc/pygraphviz-%s' % release.version
--data = [
--    (docdirbase, glob("*.txt")),
--    (os.path.join(docdirbase, 'examples'), glob("examples/*.py")),
--    (os.path.join(docdirbase, 'examples'), glob("examples/*.dat")),
--    (os.path.join(docdirbase, 'examples'), glob("examples/*.dat.gz")),
--]
- package_data = {'': ['*.txt'], }
- 
- if __name__ == "__main__":
-@@ -75,7 +68,6 @@ if __name__ == "__main__":
-         download_url=release.download_url,
-         classifiers=release.classifiers,
-         packages=packages,
--        data_files=data,
-         ext_modules=extension,
-         cmdclass={
-             'install': AddExtensionInstallCommand,

diff --git a/dev-python/pygraphviz/pygraphviz-1.6.ebuild b/dev-python/pygraphviz/pygraphviz-1.6.ebuild
deleted file mode 100644
index 7ccdcb7b00c..00000000000
--- a/dev-python/pygraphviz/pygraphviz-1.6.ebuild
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-
-inherit distutils-r1
-
-DESCRIPTION="Python wrapper for the Graphviz Agraph data structure"
-HOMEPAGE="https://pygraphviz.github.io/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ppc ~ppc64 x86 ~x86-linux ~ppc-macos ~x64-macos"
-
-# Note: only C API of graphviz is used, PYTHON_USEDEP unnecessary.
-RDEPEND="media-gfx/graphviz"
-DEPEND="${RDEPEND}"
-BDEPEND="
-	app-arch/unzip
-	dev-lang/swig:0
-	test? ( dev-python/doctest-ignore-unicode[${PYTHON_USEDEP}] )"
-
-distutils_enable_tests nose
-
-PATCHES=( "${FILESDIR}"/${PN}-1.5-docs.patch )
-
-python_prepare_all() {
-	distutils-r1_python_prepare_all
-	swig -python pygraphviz/graphviz.i || die
-}
-
-python_test() {
-	nosetests -c setup.cfg -x -v "${BUILD_DIR}"/lib/pygraphviz || die
-}
-
-python_install_all() {
-	dodoc -r examples
-	docompress -x /usr/share/doc/${PF}/examples
-
-	distutils-r1_python_install_all
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygraphviz/, dev-python/pygraphviz/files/
@ 2024-02-06  5:18 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2024-02-06  5:18 UTC (permalink / raw
  To: gentoo-commits

commit:     3e56c3670c1c691007f710416d0b9d6c86658842
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  6 05:16:38 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb  6 05:16:38 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e56c367

dev-python/pygraphviz: fix build w/ swig-4.2.0

Closes: https://bugs.gentoo.org/921637
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/pygraphviz-1.12-swig-4.2.0.patch         | 290 +++++++++++++++++++++
 dev-python/pygraphviz/pygraphviz-1.12-r1.ebuild    |  54 ++++
 2 files changed, 344 insertions(+)

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
new file mode 100644
index 000000000000..3daa485044ce
--- /dev/null
+++ b/dev-python/pygraphviz/files/pygraphviz-1.12-swig-4.2.0.patch
@@ -0,0 +1,290 @@
+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
new file mode 100644
index 000000000000..1b22df1f3274
--- /dev/null
+++ b/dev-python/pygraphviz/pygraphviz-1.12-r1.ebuild
@@ -0,0 +1,54 @@
+# 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..11} )
+
+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 ~ppc ~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
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pygraphviz/, dev-python/pygraphviz/files/
@ 2024-05-25  6:21 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2024-05-25  6:21 UTC (permalink / raw
  To: gentoo-commits

commit:     3c522f860dbe3e4a29b8bc2b93b6b7dd05cf42cc
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat May 25 06:16:30 2024 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat May 25 06:21:17 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c522f86

dev-python/pygraphviz: Remove old

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pygraphviz/Manifest                     |   1 -
 .../files/pygraphviz-1.12-swig-4.2.0.patch         | 290 ---------------------
 dev-python/pygraphviz/pygraphviz-1.12-r1.ebuild    |  54 ----
 3 files changed, 345 deletions(-)

diff --git a/dev-python/pygraphviz/Manifest b/dev-python/pygraphviz/Manifest
index ecd5fc873fc8..ea30261224ea 100644
--- a/dev-python/pygraphviz/Manifest
+++ b/dev-python/pygraphviz/Manifest
@@ -1,2 +1 @@
-DIST pygraphviz-1.12.tar.gz 104941 BLAKE2B 5c2d119c66837d13511ef4756093b159f45ccb2888eb2b86c1d016837059ed34bdc5cb7e69eeff013642d92ec0c2b4a1149316b0baaa742c49a34945fd2563e0 SHA512 2407fdd7de3b2f7f1d9f9e3e3fe0f19c4faad4a72db33a0b4341a01f98eecd4d240079f2d0ea5cf68a5e10236f11fd84e55fd44518611efde2fab7590e3aae90
 DIST pygraphviz-1.13.tar.gz 104642 BLAKE2B 6111c1b811d5359da673f9c43719d21e86e93e7e82e5819872fed6f87ebb74efb87dba40b5dac737b93bffcd51683f143528a135a76e3d6f62615593fdc22b88 SHA512 3159fd9fb1226974c3a6289ebc437eed394021a7fc41669e29879fa6fd5e5cb809c808a4016cfb1afaf30dc10e467e8b0fe5c3b71fb9a1f889efcf5ae6ff3597

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
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-05-25  6:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-05  5:50 [gentoo-commits] repo/gentoo:master commit in: dev-python/pygraphviz/, dev-python/pygraphviz/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2021-08-18 17:08 Michał Górny
2024-02-06  5:18 Sam James
2024-05-25  6:21 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox