-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
43 lines (34 loc) · 1.14 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
#! /usr/bin/env python
from distutils.core import setup
import glob
##-------------------------------------------------
## Overly basic way of automating package list
def make_pkg_string(dir_path):
dir_list = dir_path.split('/')
result = dir_list[0]
for i in dir_path.split('/')[1:-1]:
result = result + '.' + i
return result
PACKAGES = ['newdust']
n, keep_looking = 1, True
while keep_looking:
pkg_paths = glob.glob('newdust/' + '*/' * n)
if len(pkg_paths) == 0:
keep_looking = False
else:
pkg_names = [make_pkg_string(p) for p in pkg_paths]
for pn in pkg_names: PACKAGES.append(pn)
n += 1
PACKAGES.remove('newdust.graindist.tables')
PACKAGES.remove('newdust.scatteringmodel.tables')
##-------------------------------------------------
## Package setup
setup(name='newdust',
version='0.1',
description='Library of dust scattering codes',
author='Lia Corrales',
author_email='lia@astro.wisc.edu',
url='https://github.com/eblur/newdust',
packages=PACKAGES,
package_data={'newdust': ['graindist/tables/*', 'scatteringmodel/tables/*']}
)