-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
87 lines (72 loc) · 2.46 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
80
81
82
83
84
85
86
87
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup script for the installation of pythonUtils.
It is possible to install this package with
python setup.py install
"""
from glob import glob
import sys
import os
import warnings
from pythonUtils import release
## Temporally commented
#if os.path.exists('MANIFEST'):
# os.remove('MANIFEST')
## Definition of useful functions
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
## Check problems with the setuptools
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'setup.py':
print("To install, run 'python setup.py install'")
print()
version = release.write_versionfile()
packages = ['pythonUtils',
'pythonUtils.CodingText', 'pythonUtils.CollectionMeasures',
'pythonUtils.Combinatorics',
'pythonUtils.ExploreDA',
'pythonUtils.ExploreDA.Statistics',
'pythonUtils.ExploreDA.Plotting',
'pythonUtils.ExploreDA.SummaryStatistics',
'pythonUtils.Logger',
'pythonUtils.ProcessTools', 'pythonUtils.TUI_tools',
'pythonUtils.numpy_tools', 'pythonUtils.parallel_tools',
'pythonUtils.perturbation_tests', 'pythonUtils.sklearn_tools'
]
docdirbase = 'share/doc/pythonUtils-%s' % version
# add basic documentation
data = [(docdirbase, glob("*.txt"))]
# add examples
for d in ['advanced',
'algorithms']:
dd = os.path.join(docdirbase, 'examples', d)
pp = os.path.join('examples', d)
data.append((dd, glob(os.path.join(pp, "*.py"))))
data.append((dd, glob(os.path.join(pp, "*.bz2"))))
data.append((dd, glob(os.path.join(pp, "*.gz"))))
data.append((dd, glob(os.path.join(pp, "*.mbox"))))
data.append((dd, glob(os.path.join(pp, "*.edgelist"))))
# add the tests
#package_data = {'pythonUtils': ['tests/*.py']}
package_data = {}
install_requires = ['numpy', 'scipy', 'pandas', 'matplotlib']
## Setup
setup(name=release.name,
version=version,
description=release.description,
license=release.license,
platforms=release.platforms,
maintainer=release.maintainer,
maintainer_email=release.maintainer_email,
author=release.author,
author_email=release.author_email,
url=release.url,
classifiers=release.classifiers,
long_description=read('README.md'),
packages=packages,
install_requires=install_requires,
)