-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
66 lines (58 loc) · 2.22 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
#
# @Author: oesteban - code@oscaresteban.es
# @Date: 2014-06-05 16:51:52
# @Last Modified by: oesteban
# @Last Modified time: 2016-09-06 09:35:45
""" diffantom setup script """
PACKAGE_NAME = 'diffantom'
def main():
""" Install entry-point """
from os import path as op
from glob import glob
from inspect import getfile, currentframe
from setuptools import setup, find_packages
from io import open # pylint: disable=W0622
this_path = op.dirname(op.abspath(getfile(currentframe())))
# Python 3: use a locals dictionary
# http://stackoverflow.com/a/1463370/6820620
ldict = locals()
# Get version and release info, which is all stored in diffantom/info.py
module_file = op.join(this_path, PACKAGE_NAME, 'info.py')
with open(module_file) as infofile:
pythoncode = [line for line in infofile.readlines() if not line.strip().startswith('#')]
exec('\n'.join(pythoncode), globals(), ldict)
setup(
name=PACKAGE_NAME,
version=ldict['__version__'],
description=ldict['__description__'],
long_description=ldict['__longdesc__'],
author=ldict['__author__'],
author_email=ldict['__email__'],
maintainer=ldict['__maintainer__'],
maintainer_email=ldict['__email__'],
license=ldict['__license__'],
url=ldict['URL'],
download_url=ldict['DOWNLOAD_URL'],
classifiers=ldict['CLASSIFIERS'],
packages=find_packages(exclude=['build', 'dist', 'docs', 'paper']),
zip_safe=False,
# Dependencies handling
setup_requires=[],
install_requires=ldict['REQUIRES'],
dependency_links=ldict['LINKS_REQUIRES'],
tests_require=ldict['TESTS_REQUIRES'],
extras_require=ldict['EXTRA_REQUIRES'],
package_data={PACKAGE_NAME: ['data/bedpostx.json',]},
entry_points={
'console_scripts': [
'diffantom=diffantom.scripts.diffantom:main',
'sticks2dwis=diffantom.scripts.sticks2dwis:main'
]
}
)
if __name__ == '__main__':
main()