forked from fermiPy/dmsky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
76 lines (70 loc) · 2.05 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
import sys
import os
from setuptools import setup, find_packages
import versioneer
NAME = 'dmsky'
CLASSIFIERS = """\
Development Status :: 2 - Pre-Alpha
Intended Audience :: Science/Research
Intended Audience :: Developers
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Natural Language :: English
Topic :: Scientific/Engineering
Topic :: Scientific/Engineering :: Physics
Topic :: Scientific/Engineering :: Astronomy
Operating System :: MacOS
Operating System :: POSIX
License :: OSI Approved :: MIT License
"""
URL = 'https://github.com/kadrlica/dmsky'
DESC = "Dark matter skymaps."
LONG_DESC = "See %s"%URL
if sys.version_info[:2] < (2, 7):
raise RuntimeError("Python version >= 2.7 required.")
def find_data_files(datadir=None):
"""
http://stackoverflow.com/a/13629066/4075339
"""
# Copy the data files
if not datadir: datadir = os.path.join(NAME,'data')
data_files = [(d, [os.path.join(d,f) for f in files])
for d, folders, files in os.walk(datadir)]
return data_files
def find_package_data(datadir=None):
"""
http://stackoverflow.com/a/36693250/4075339
"""
if not datadir: datadir = os.path.join(NAME,'data')
paths = []
for (d, folders, files) in os.walk(datadir):
for f in files:
paths.append(os.path.join('..', d, f))
package_data = {'':paths}
return package_data
setup(
name=NAME,
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
url=URL,
author='Alex Drlica-Wagner',
author_email='[email protected]',
scripts = [],
install_requires=[
'setuptools',
'numpy >= 1.9.0',
'scipy >= 0.14.0',
'healpy >= 1.6.0',
'pyyaml >= 3.12',
'pymodeler >= 0.1.0',
],
packages=find_packages(),
#data_files=find_data_files(),
package_data=find_package_data(),
include_package_data=True,
description=DESC,
long_description=LONG_DESC,
platforms='any',
classifiers = [_f for _f in CLASSIFIERS.split('\n') if _f]
)