-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
60 lines (51 loc) · 2.09 KB
/
Copy pathsetup.py
File metadata and controls
60 lines (51 loc) · 2.09 KB
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
#!/usr/bin/env python
import os
import os.path as osp
import shutil
import sys
from distutils.core import setup, Extension
import subprocess
import numpy
if 'develop' in sys.argv:
# use setuptools for develop, but nothing else
from setuptools import setup
with open('README.md') as file:
long_description = file.read()
with open('CHANGES') as file:
long_description += file.read()
with open('REQUIREMENTS') as file:
requirements = file.readlines()
try: # Python 3.x
from distutils.command.build_py import build_py_2to3 as build_py
except ImportError: # Python 2.x
from distutils.command.build_py import build_py
from slugpy import __version__ as version
tagname = "slugpy_%s" % (version)
download_url = "https://bitbucket.org/krumholz/slug2/"
bpc = osp.join('slugpy', 'bayesphot', 'bayesphot_c')
setup(name='SLUGPY',
version=version,
description='a python package to use with the SLUG stochastic SPS code',
long_description=long_description,
author=['Mark Krumholz'],
author_email=['mark.krumholz@gmail.com'],
packages=['slugpy', 'slugpy.bayesphot', 'slugpy.cloudy',
'slugpy.cluster_slug', 'slugpy.sfr_slug'],
requires=requirements,
cmdclass={'build_py': build_py},
classifiers=[
"Development Status :: 3 - Alpha",
"Programming Language :: Python",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)"
],
ext_modules = [Extension('slugpy.bayesphot.bayesphot',
[osp.join(bpc, 'geometry.c'),
osp.join(bpc, 'kdtree.c'),
osp.join(bpc, 'kernel_density.c'),
osp.join(bpc, 'kernel_density_neighbors.c'),
osp.join(bpc, 'kernel_density_rep.c'),
osp.join(bpc, 'kernel_density_util.c'),
osp.join(bpc, 'kernel_density_draw.c')
],
libraries=['gsl', 'gslcblas'])]
)