summaryrefslogtreecommitdiff
path: root/dev-python/pygraphviz
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/pygraphviz
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/pygraphviz')
-rw-r--r--dev-python/pygraphviz/Manifest11
-rw-r--r--dev-python/pygraphviz/files/pygraphviz-1.0-setup.py.patch33
-rw-r--r--dev-python/pygraphviz/files/pygraphviz-1.2-avoid_tests.patch47
-rw-r--r--dev-python/pygraphviz/files/pygraphviz-1.3.1-docs.patch29
-rw-r--r--dev-python/pygraphviz/files/pygraphviz-1.3.1-swig-3.patch23
-rw-r--r--dev-python/pygraphviz/metadata.xml17
-rw-r--r--dev-python/pygraphviz/pygraphviz-1.2.ebuild39
-rw-r--r--dev-python/pygraphviz/pygraphviz-1.3.1.ebuild48
8 files changed, 247 insertions, 0 deletions
diff --git a/dev-python/pygraphviz/Manifest b/dev-python/pygraphviz/Manifest
new file mode 100644
index 000000000000..d32e5aa9b64f
--- /dev/null
+++ b/dev-python/pygraphviz/Manifest
@@ -0,0 +1,11 @@
+AUX pygraphviz-1.0-setup.py.patch 1215 SHA256 d9b33fb2c9e7a29664f735d050a2f3a4ace7322a0260b6b4a14dc859fb259d25 SHA512 176497d1e61ee74b6ca576b322ec47eccfb67d2fa1341c7f0f857ecc32ccd16660262abe46a90871ee4cba60587670d8b479bfd60944ac0de32b13f4aab4846c WHIRLPOOL c6b81f11eb014787d091d99842e6e64f16651b6646ae2da0e4537eb6cbb87b4c2bd40d87c879c02dc3022e8d02d4c178130c11e542ac3aa3b7a03e4cd6f5cba1
+AUX pygraphviz-1.2-avoid_tests.patch 1620 SHA256 56a331c73eb6b5f12dc67a4d8b4a2b3173d88095099c2b9271469b6bdd2a7e72 SHA512 74c161dbeb69ad2b9f381428b6cc0e0d8411d95b121fb16eb0f1e45344a52c2dafc2bf06cac8a6be8152fb1592bd55bf001da85e4e53ed82bec39f61c7d329f2 WHIRLPOOL 6493194b90fe0100c2e07384cd67e0ffe2a5e7396de822dc89557bd1bda1cfe2771b0f6cdc41a0604ef71ca97929618f867c0d1f100b69bb1f1342ae056a018b
+AUX pygraphviz-1.3.1-docs.patch 929 SHA256 42fe9f7ad1482f701cec8c858b14b8e7e6243df9b3df7923e6bd82ffe4a98c8c SHA512 003ed3275771998a40c162abfc61ebf78cb149b20b2b4c770725459364e08a5afb33fe39b00e2e662706a40c3a91033d9e0aead66a7cd627b3b0b2ceba5a62d2 WHIRLPOOL ac27888416ec8c7bb70a9f2cc313334c8c763efa49b74ae9664ece7ddedb36ca7bc541a5e03133603fe53c00edb2cd6ec955dbc9392b27619b813cdedfa40f66
+AUX pygraphviz-1.3.1-swig-3.patch 790 SHA256 bd502470196cb7a5e43d9840c5ee39deea0cf37e0bdf9c218af6eaf3b7a234ad SHA512 37a5689360aa786a94bd3bbad98bca4bf5f3a61eb2dc54de1c4bec3b6ec677e4f99a817b896687e2506386becc67f5e31308a30ceaedd388e57693ae9e8de2d4 WHIRLPOOL 97a018a85fccbc2cf89b9404ea2d2bf8e6e56123a9bbdfe314b6197cfa52532dc3ba44e28d9915ff5454674a99cd07f3a8dd2c550850127b3547f41e9fdbb583
+DIST pygraphviz-1.2.tar.gz 90913 SHA256 2e8a82a07dcf006b9558d22c5a6357c012193d4cc681776845e515fffeccc6b3 SHA512 e477af635594c3ba1aa6fa499bc5e60df14e76616a1a777f648e2e96d3953dd3d0b3bae4a92275dac2f7466276cf526ecb8b6a63fd3fbad26ee24b67d76ecfa3 WHIRLPOOL 2757d02b130f326ee2638b78761094de1a841293b6de1d5ea2c89c169cbc8525041e06daef9ded32d7c1ac944ef99293ab67fee6c75a2976283f87725635a4d5
+DIST pygraphviz-1.3.1.tar.gz 103336 SHA256 7c294cbc9d88946be671cc0d8602aac176d8c56695c0a7d871eadea75a958408 SHA512 e1957d7daf7ae9e60873cb6f23ac19a3320b4b10579ab24a2307beb558dad11a8e82e1da528799165b761d944efb4860b7296e3218846f7885f715c396a8e3dc WHIRLPOOL dd4ac48c4e4c05a134a6ba076979f9dc1ea7fab03700208aedf9cd6acf3fb5595a26b3a0f1de8d46a61750dea60a6e31f180719cb51b1e916ecc677dde61a618
+EBUILD pygraphviz-1.2.ebuild 984 SHA256 4e31d1f8917bfdee6605ec596e0a5d48980c1fbeb396322356ec61a2a736677d SHA512 fd7921219ec847b4976bb1c00cc053236a0aab1d46d927c621fe93d7664fe334dfd0b0de3e411bd182158046e6b01a1fad29693e8de09a77c11299c57aee8a3a WHIRLPOOL 51757847a8333fbdf12b8207dc8fca94eeff12a7f87623103b5318852333da2182c03005a0df0020bde916df51ca19a38cef038332a15a4db4b8f14664627864
+EBUILD pygraphviz-1.3.1.ebuild 1101 SHA256 473933df9653ea230ad283631df8dccebe81ad85ebba26384e4d4aa31c049d5e SHA512 5676ad5126cf8a611560c5f8ecdb1fab4959324d733d412e6347410cb2da569248e52e93125f1325f71128313c4816ab6e7a3aaec22e0b72f8d993513d3a56db WHIRLPOOL 818d1f58c8ccb801d2ac8d392f9895b41f78e64138b69006f9ce9156645a301d6eda1c949a0b0894a15e514cf7c134c6dcad272c87e6f8cead67777032a79acb
+MISC ChangeLog 4169 SHA256 eaed85e424f7d862ce9c9cb823f21791183c756116c0d180c6675a2928ae3ed6 SHA512 4f71bfc27176aad157e9916d4b52263ec4205c5b112880e176ed621074a731b13a8af4dc0001af062b75e14845cd5dda8d2f90822c544b06ce093ca11e487afb WHIRLPOOL 6fa2c649d4060edd18b2aa592a8286fc9b538974940c5c4ba6ca78ea0caf237c490aab41fc0eb4e5cee18358d4a28c148ece6e5153d4a8f191ea62747813f28a
+MISC ChangeLog-2015 3508 SHA256 ca7a9e80b300c74496668610b9f5dbf13eac1a108591e4eb75ae9dd3080ec85d SHA512 efb454678a58c05fd23389891425791047a522ec92542e33fad55699daccf48ef02fa61c3be82632049a628f6497d11f76f93b80fcea99a053f11237b4266efc WHIRLPOOL 0e4a1df3166d043394235964f9f4f6b0502cdc57edd55e4b14cb49f92c0a548b1a51b8cf95427686f785f70a1f3b26bffac85aed2035c8f671a478355876f665
+MISC metadata.xml 616 SHA256 81130eb6e928a4eed129e5acf39d1fdcbad6346d2f9a7de06201cd97cb91453c SHA512 fd9922ce1c9f9d5381c5ed4f4679b45b5bfbb21c452a1ba4064e26fd33e59f648593d7322d1ee68bb4d3e2268a5a8dd2e7f676679d57147929cdb0493835d34d WHIRLPOOL fcc11919a0b92f193fc81988593719a8b21d96877545928d09d910a0f5640b1065d079f5313f7d685524273eaf00c2f1b86570f2097436fffb11e8f523b06841
diff --git a/dev-python/pygraphviz/files/pygraphviz-1.0-setup.py.patch b/dev-python/pygraphviz/files/pygraphviz-1.0-setup.py.patch
new file mode 100644
index 000000000000..13eb0f213ce1
--- /dev/null
+++ b/dev-python/pygraphviz/files/pygraphviz-1.0-setup.py.patch
@@ -0,0 +1,33 @@
+--- 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
new file mode 100644
index 000000000000..d444ee3d2df7
--- /dev/null
+++ b/dev-python/pygraphviz/files/pygraphviz-1.2-avoid_tests.patch
@@ -0,0 +1,47 @@
+ 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
new file mode 100644
index 000000000000..aed5c9075b88
--- /dev/null
+++ b/dev-python/pygraphviz/files/pygraphviz-1.3.1-docs.patch
@@ -0,0 +1,29 @@
+ 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
new file mode 100644
index 000000000000..912667e7f5a7
--- /dev/null
+++ b/dev-python/pygraphviz/files/pygraphviz-1.3.1-swig-3.patch
@@ -0,0 +1,23 @@
+ 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/metadata.xml b/dev-python/pygraphviz/metadata.xml
new file mode 100644
index 000000000000..42853a572012
--- /dev/null
+++ b/dev-python/pygraphviz/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <longdescription lang="en">
+ Pygraphviz is a Python interface to the Graphviz graph layout and
+ visualization package.
+ With Pygraphviz you can create, edit, read, write, and draw graphs using
+ Python to access the Graphviz graph data structure and layout algorithms.
+</longdescription>
+ <upstream>
+ <remote-id type="pypi">pygraphviz</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/pygraphviz/pygraphviz-1.2.ebuild b/dev-python/pygraphviz/pygraphviz-1.2.ebuild
new file mode 100644
index 000000000000..25e0035803a5
--- /dev/null
+++ b/dev-python/pygraphviz/pygraphviz-1.2.ebuild
@@ -0,0 +1,39 @@
+# 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.python.org/pypi/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
new file mode 100644
index 000000000000..6a20231e9340
--- /dev/null
+++ b/dev-python/pygraphviz/pygraphviz-1.3.1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,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"
+
+# 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
+}