-
Notifications
You must be signed in to change notification settings - Fork 14
/
setup.py
74 lines (66 loc) · 2.35 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
import os
import shutil
from setuptools import setup
from distutils.core import Extension
import sys
import subprocess
import glob
import platform
WIN32= platform.system() == 'Windows'
long_description= ''
previous_line= ''
with open('README.rst') as dfile:
for line in dfile:
if not 'image' in line and not 'target' in line \
and not 'DETAILED' in line and not '**master**' in line \
and not '**development' in line \
and not 'DETAILED' in previous_line:
long_description+= line
previous_line= line
#SFD extension
sfd_c_src= glob.glob('mwdust/util/SFD_CodeC/*.c')
if not WIN32:
sfd_libraries=['m']
else:
sfd_libraries=[]
sfd_c= Extension('sfd_c',
sources=sfd_c_src,
libraries=sfd_libraries,
extra_compile_args=['-DLITTLE_ENDIAN'],
include_dirs=['mwdust/util/SFD_CodeC'])
#healpix extension
healpix_c_src= glob.glob('mwdust/util/healpix_CodeC/*.c')
healpix_c= Extension('healpix_c',
sources=healpix_c_src,
libraries=sfd_libraries,
extra_compile_args=['-DLITTLE_ENDIAN'],
include_dirs=['mwdust/util/healpix_CodeC'])
ext_modules=[sfd_c, healpix_c]
install_requires= ['numpy','scipy','matplotlib','astropy','h5py','tqdm', 'requests']
if not WIN32:
install_requires.append('healpy')
setup(name='mwdust',
version='1.6.dev0',
description='Dust in the Milky Way',
author='Jo Bovy',
author_email='[email protected]',
license='New BSD',
long_description=long_description,
url='https://github.com/jobovy/mwdust',
package_dir = {'mwdust/': ''},
packages=['mwdust',
'mwdust/util'],
package_data={'mwdust/util':['extCurves/extinction.tbl',
'extCurves/apj398709t6_ascii.txt']},
install_requires=install_requires,
ext_modules=ext_modules,
classifiers=[
"Development Status :: 6 - Mature",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: C",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Astronomy",
"Topic :: Scientific/Engineering :: Physics"]
)