-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
56 lines (44 loc) · 1.29 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
#!/usr/bin/env python
# Supports:
# - python setup.py install
# - python setup.py test
#
# Does not support:
# - python setup.py version
import os, glob
from setuptools import setup, find_packages
def _get_version():
import subprocess
version = subprocess.check_output('git describe', shell=True)
version = version.decode('utf-8').replace('\n', '')
return version
version = _get_version()
with open('README.rst') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
setup_kwargs=dict(
name='legacyhalos',
url='https://github.com/moustakas/legacyhalos',
version=version,
author='John Moustakas',
author_email='jmoustakas@siena.edu',
#packages=[],
license=license,
description='Stellar mass content of dark matter halos in DESI Legacy Surveys imaging.',
long_description=readme,
)
#- What to install
setup_kwargs['packages'] = find_packages('py')
setup_kwargs['package_dir'] = {'':'py'}
#- Treat everything in bin/ as a script to be installed
setup_kwargs['scripts'] = glob.glob(os.path.join('bin', '*'))
#- Data to include
# setup_kwargs['package_data'] = {
# 'legacyhalos': ['data/*',],
# 'legacyhalos.test': ['data/*',],
# }
#- Testing
setup_kwargs['test_suite'] = 'legacyhalos.test.test_suite'
#- Go!
setup(**setup_kwargs)