forked from Lainports/freebsd-ports
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]
62 lines
2 KiB
Makefile
62 lines
2 KiB
Makefile
# Created by: dikshie
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= networkx
|
|
PORTVERSION= 1.10
|
|
PORTREVISION= 2
|
|
CATEGORIES= math python
|
|
MASTER_SITES= http://networkx.lanl.gov/download/networkx/ \
|
|
CHEESESHOP
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
|
|
|
MAINTAINER= dikshie@sfc.wide.ad.jp
|
|
COMMENT= Tools for complex networks
|
|
|
|
LICENSE= BSD3CLAUSE
|
|
|
|
RUN_DEPENDS:= ${PYTHON_PKGNAMEPREFIX}decorator>=3.4.0:${PORTSDIR}/devel/py-decorator
|
|
|
|
# ${PYTHON_PKGNAMEPREFIX}sphinx>=1.2.3:${PORTSDIR}/textproc/py-sphinx \
|
|
# ${PYTHON_PKGNAMEPREFIX}docutils>=0.12:${PORTSDIR}/textproc/py-docutils
|
|
|
|
NO_ARCH= yes
|
|
USES= python shebangfix
|
|
USE_PYTHON= autoplist concurrent distutils
|
|
|
|
PLIST_SUB+= PYTHON_MAJOR_VER=${PYTHON_MAJOR_VER}
|
|
|
|
OPTIONS_DEFINE= EXAMPLES YAML
|
|
OPTIONS_GROUP= MATRIX RENDER
|
|
OPTIONS_GROUP_MATRIX= NUMPY SCIPY
|
|
OPTIONS_GROUP_RENDER= MPL GRAPHVIZ
|
|
OPTIONS_DEFAULT= NUMPY SCIPY MPL GRAPHVIZ YAML
|
|
|
|
NUMPY_DESC= Matrix representation of graphs
|
|
NUMPY_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=1.9.2:${PORTSDIR}/math/py-numpy
|
|
|
|
SCIPY_DESC= Sparse matrix representation of graphs
|
|
SCIPY_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}scipy>=0.15.1:${PORTSDIR}/science/py-scipy \
|
|
${PYTHON_PKGNAMEPREFIX}scikit-sparse>=0.2:${PORTSDIR}/science/py-scikit-sparse
|
|
|
|
MPL_DESC= Flexible graph rendering
|
|
MPL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}matplotlib>=1.4.0:${PORTSDIR}/math/py-matplotlib
|
|
|
|
GRAPHVIZ_DESC= Additional graph layout and rendering algorithms
|
|
GRAPHVIZ_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pygraphviz>=1.2:${PORTSDIR}/graphics/py-pygraphviz
|
|
|
|
YAML_DESC= Reading and writing YAML files
|
|
YAML_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}yaml>=0:${PORTSDIR}/devel/py-yaml
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if ${PYTHON_REL} >= 3000 && (${PORT_OPTIONS:MMPL} || ${PORT_OPTIONS:MGRAPHVIZ})
|
|
BROKEN= Neither math/py-matplotlib nor graphics/py-graphviz support Python 3.x yet. Please disable both the MPL and GRAPHVIZ options
|
|
.endif
|
|
|
|
PORTEXAMPLES= *
|
|
|
|
post-install:
|
|
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
|
cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
|
|
|
|
.include <bsd.port.post.mk>
|