summaryrefslogtreecommitdiff
path: root/graphics/py-pygraphviz
diff options
context:
space:
mode:
authorKubilay Kocak <koobs@FreeBSD.org>2016-02-07 09:44:24 +0000
committerKubilay Kocak <koobs@FreeBSD.org>2016-02-07 09:44:24 +0000
commit275db1ead53c381454d7fe8349fea0b810c4619d (patch)
treea9660575bd4e1aa34677dd31fe7a8823481df245 /graphics/py-pygraphviz
parentUpdate to 1.8 (diff)
graphics/py-graphviz: Move to py-pygraphviz, Fix 3.x build
There are numerous graphviz related packages in PyPI, including: graphviz, graphviz-python and pygraphviz. This port, py-graphviz, is not and does not provide the same package as the 'graphviz' package on PyPI (CHEESESHOP). Further, it blocks the creation of a correctly named py-graphviz port, is a POLA violation in terms of users expecting to find and recieve the package they expect based on a standard search, and is likely to create confusion among other ports if they depend on a python graphviz package, which could result in incorrect packages/dependencies. This is why among other reasons, Python packages should be named exactly what they are called in PyPI, or inside install_requires, setup_requires or tests_requires as dependencies in other packages. This change moves py-graphviz to py-pygraphviz to correct the above incorrect naming. While I'm here: - Remove backup (http) MASTER_SITES, CHEESESHOP is highly-available and provides a Geo-aware CDN by Fastly. - Remove {BUILD,RUN}_DEPENDS in favour of the actual LIB_DEPENDS - Use PYDISTUTILS_* framework variables to customise the build instead of hack patching setup.py - Enable autoplist, fixing builds on Python 3.x [1] - Enable concurrent (Python version) installation - Hack patch setup.py to preclude docs installation, as it adds a directory to --record and breaks pkg-plist output [2] - Remove DOCSDIR override (no longer necessary) - Assign MAINTAINER'ship to python@ - Add TEST_DEPENDS and test target - pkg-descr: Match WWW URL to setup.py:homepage field - pkg-descr: Improve package description text (matching upstream) While I'm sweeping dependencies: - Fix a typo in science/gramps: s|>-|>= [2] https://wiki.freebsd.org/Python (Open task for install_data bug) Reported by: Ben Woods (via IRC) [1]
Notes
Notes: svn path=/head/; revision=408353
Diffstat (limited to 'graphics/py-pygraphviz')
-rw-r--r--graphics/py-pygraphviz/Makefile34
-rw-r--r--graphics/py-pygraphviz/distinfo2
-rw-r--r--graphics/py-pygraphviz/files/patch-setup.py32
-rw-r--r--graphics/py-pygraphviz/pkg-descr6
4 files changed, 74 insertions, 0 deletions
diff --git a/graphics/py-pygraphviz/Makefile b/graphics/py-pygraphviz/Makefile
new file mode 100644
index 000000000000..bbcd3c70afe8
--- /dev/null
+++ b/graphics/py-pygraphviz/Makefile
@@ -0,0 +1,34 @@
+# Created by: Hye-Shik Chang <perky@fallin.lv>
+# $FreeBSD$
+
+PORTNAME= pygraphviz
+PORTVERSION= 1.3.1
+CATEGORIES= graphics python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= python@FreeBSD.org
+COMMENT= Python interface to GraphViz agraph
+
+
+LIB_DEPENDS= libcgraph.so:${PORTSDIR}/graphics/graphviz
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}nose>=0.10.1:${PORTSDIR}/devel/py-nose
+
+USES= pkgconfig python
+USE_PYTHON= autoplist concurrent distutils
+
+PYDISTUTILS_BUILD_TARGET= build build_ext
+PYDISTUTILS_BUILDARGS= --include-dirs=${LOCALBASE}/include \
+ --library-dirs=${LOCALBASE}/lib/graphviz
+
+post-patch:
+ @${REINPLACE_CMD} -e 's+%%LOCALBASE%%+${LOCALBASE}+; \
+ s+^docdirbase.*=.*+docdirbase = "${DOCSDIR:S/${PREFIX}\///}"+' ${WRKSRC}/setup.py
+
+post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/pygraphviz/_graphviz.so
+
+do-test:
+ @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
+
+.include <bsd.port.mk>
diff --git a/graphics/py-pygraphviz/distinfo b/graphics/py-pygraphviz/distinfo
new file mode 100644
index 000000000000..f7df1ba65aba
--- /dev/null
+++ b/graphics/py-pygraphviz/distinfo
@@ -0,0 +1,2 @@
+SHA256 (pygraphviz-1.3.1.tar.gz) = 7c294cbc9d88946be671cc0d8602aac176d8c56695c0a7d871eadea75a958408
+SIZE (pygraphviz-1.3.1.tar.gz) = 103336
diff --git a/graphics/py-pygraphviz/files/patch-setup.py b/graphics/py-pygraphviz/files/patch-setup.py
new file mode 100644
index 000000000000..117b152c4869
--- /dev/null
+++ b/graphics/py-pygraphviz/files/patch-setup.py
@@ -0,0 +1,32 @@
+--- setup.py.orig 2016-02-07 08:48:26 UTC
++++ setup.py
+@@ -36,14 +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__":
+ define_macros = []
+@@ -75,14 +67,11 @@ if __name__ == "__main__":
+ download_url=release.download_url,
+ classifiers=release.classifiers,
+ packages=packages,
+- data_files=data,
+ ext_modules=extension,
+ cmdclass={
+ 'install': AddExtensionInstallCommand,
+ 'develop': AddExtensionDevelopCommand,
+ },
+- package_data=package_data,
+- include_package_data = True,
+ test_suite='nose.collector',
+ tests_require=['nose>=0.10.1', 'doctest-ignore-unicode>=0.1.0',],
+ )
diff --git a/graphics/py-pygraphviz/pkg-descr b/graphics/py-pygraphviz/pkg-descr
new file mode 100644
index 000000000000..110028fe4fc9
--- /dev/null
+++ b/graphics/py-pygraphviz/pkg-descr
@@ -0,0 +1,6 @@
+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.
+
+WWW: http://pygraphviz.github.io