aboutsummaryrefslogtreecommitdiffstats
path: root/math/py-networkx/Makefile
blob: 427eaf8b447b8c52378c1ecbe9680cc640772c05 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Created by: dikshie
# $FreeBSD$

PORTNAME=   networkx
PORTVERSION=    1.10
PORTREVISION=   3
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:devel/py-decorator

#       ${PYTHON_PKGNAMEPREFIX}sphinx>=1.2.3:textproc/py-sphinx \
#       ${PYTHON_PKGNAMEPREFIX}docutils>=0.12:textproc/py-docutils

NO_ARCH=    yes
USES=       python shebangfix
USE_PYTHON= autoplist concurrent distutils
SHEBANG_FILES=  examples/graph/atlas.py \
        examples/multigraph/chess_masters.py \
        networkx/generators/tests/test_random_graphs.py

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,1:math/py-numpy

SCIPY_DESC= Sparse matrix representation of graphs
SCIPY_RUN_DEPENDS=  ${PYTHON_PKGNAMEPREFIX}scipy>=0.15.1:science/py-scipy \
            ${PYTHON_PKGNAMEPREFIX}scikit-sparse>=0.2:science/py-scikit-sparse

MPL_DESC=   Flexible graph rendering
MPL_RUN_DEPENDS=    ${PYTHON_PKGNAMEPREFIX}matplotlib>=1.4.0:math/py-matplotlib

GRAPHVIZ_DESC=  Additional graph layout and rendering algorithms
GRAPHVIZ_RUN_DEPENDS=   ${PYTHON_PKGNAMEPREFIX}pygraphviz>=1.2:graphics/py-pygraphviz

YAML_DESC=  Reading and writing YAML files
YAML_RUN_DEPENDS=   ${PYTHON_PKGNAMEPREFIX}yaml>=0:devel/py-yaml

.include <bsd.port.pre.mk>

.if ${PYTHON_REL} >= 3000
. if ${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
.endif

PORTEXAMPLES=   *

post-install:
    ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.post.mk>