-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
79 lines (69 loc) · 1.91 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
71
72
73
74
75
76
77
78
79
# Setup for openanalysis
import os
from setuptools import setup
import sys
import subprocess
if sys.version_info[:2] < (3, 5):
sys.stderr.write("""
ERROR
-----
This package can be run only by python>=(3, 5)
Replace python=={} by python>=(3, 5)
""".format(sys.version_info[:2]))
sys.exit(1)
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
pkg_dict = {
"ffmpeg": "ffmpeg",
"graphviz": "dot"
}
pkg_avail = {pkg: True for pkg in pkg_dict}
for pkg in pkg_dict:
try:
test_process = subprocess.Popen(pkg_dict[pkg], stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL)
subprocess.Popen.kill(test_process)
except FileNotFoundError:
pkg_avail[pkg] = False
setup(
name="OpenAnalysis",
version="0.0.8",
author="OpenWeavers1",
author_email="[email protected]",
description="An open source package to analyse and visualise algorithms and data structures",
license="GPLv3+",
keywords="OpenWeavers product",
url="https://github.com/OpenWeavers/OpenAlgorithm",
packages=['openanalysis', ],
long_description=read('README.rst'),
classifiers=[
"Development Status :: 3 - Alpha",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python :: 3.5",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
],
install_requires=[
'numpy',
'matplotlib',
'pygraphviz',
'progressbar2',
'networkx',
],
extras_require={
"extensions": [
'jupyter',
'ipython',
],
},
include_package_data=True,
)
for pkg in pkg_dict:
if not pkg_avail[pkg]:
sys.stderr.write("""
WARNING
-------
Package {0} not found...
Please install
""".format(pkg))