forked from sffjunkie/astral
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
68 lines (55 loc) · 1.69 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
# Copyright 2009-2015, Simon Kennedy, [email protected]
import os
import sys
from setuptools import setup
PACKAGE_DIR = 'src'
sys.path.insert(0, PACKAGE_DIR)
from astral import __version__ as astral_version
def dev_dir():
dev_home = os.environ.get('DEV_HOME', None)
if not dev_home:
return None
return os.path.join(dev_home, 'projects')
cmd_class = {}
tests_require = []
dd = dev_dir()
if dd:
sys.path.insert(0, dd)
try:
import common.test
cmd_class['test'] = common.test.TestCommand
tests_require.extend(common.test.requires)
except ImportError:
print('Unable to import test command. Skipping. Try running tool from command line e.g. tox')
pass
#try:
# import common.clean
# cmd_class['clean'] = common.clean.CleanCommand
#except ImportError:
# pass
description = 'Calculations for the position of the sun and moon.'
try:
from common.setup_funcs import read_contents
long_description = read_contents(os.path.dirname(__file__), 'README')
except ImportError:
long_description = description
setup(name='astral',
version=astral_version,
description=description,
long_description=long_description,
author='Simon Kennedy',
author_email='[email protected]',
url="https://launchpad.net/astral",
license='Apache-2.0',
classifiers=[
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
],
package_dir={'': PACKAGE_DIR},
py_modules=['astral'],
install_requires=['pytz'],
cmdclass = cmd_class,
tests_require=tests_require,
)