-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathsetup.py
70 lines (53 loc) · 1.53 KB
/
setup.py
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
68
69
70
# -*- coding: utf-8 -*-
"""
Setup script for `nxpd`.
"""
from __future__ import print_function
import os
import sys
try:
from setuptools import setup
has_setuptools = True
except ImportError:
from distutils.core import setup
has_setuptools = False
def main():
install_requires = [
'networkx >= 1.6',
'pyparsing >= 2.0.1',
]
packages = [
'nxpd',
'nxpd.pydot',
]
description = """
`nxpd` is a Python package for visualizing NetworkX graphs using `pydot`
and `graphviz`. Support is also provided for inline displays within IPython
notebooks.
"""
kwds = {
'name': "nxpd",
'version': "0.2.0",
'url': "https://github.com/chebee7i/nxpd",
'packages': packages,
'provides': ['nxpd'],
'install_requires': install_requires,
'author': "chebee7i",
'author_email': "[email protected]",
'description': "NetworkX Pydot Draw",
'long_description': description,
'license': "Unlicense",
}
# Automatic dependency resolution is supported only by setuptools.
if not has_setuptools:
del kwds['install_requires']
setup(**kwds)
if __name__ == '__main__':
v = sys.version_info[:2]
if v < (2, 6):
msg = "nxpd requires Python 2.6 or newer.\n"
print(msg)
sys.exit(-1)
if sys.argv[-1] == 'setup.py':
print("To install, run 'python setup.py install'.\n")
main()