-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
52 lines (41 loc) · 1.67 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
#!/usr/bin/env python
"""Setup script."""
import os
import glob
import numpy
from Cython.Build import cythonize
import yaml
from setuptools import setup, find_packages, Extension
README = '/'.join(os.path.realpath(__file__).split('/')[:-1]) + '/README.rst'
VERSION = '/'.join(os.path.realpath(__file__).split('/')[:-1]) + '/version.yaml'
# Get __version__ from version.py without importing package itself.
__version__ = yaml.load(open(VERSION))['version']
# Package name
name = 'clusters'
# Packages (subdirectories in clusters/)
packages = find_packages()
# Scripts (in scripts/)
scripts = glob.glob("scripts/*.py")
package_data = {}
extensions = [Extension("pzmassfitter.nfwmodeltools",
["pzmassfitter/nfwmodeltools.pyx", "pzmassfitter/voigt.c"],
include_dirs=[numpy.get_include()]),
Extension("pzmassfitter.voigtcall",
["pzmassfitter/voigtcall.pyx", "pzmassfitter/voigt.c"],
include_dirs=[numpy.get_include()])]
setup(name=name,
version=__version__,
description=("Cluster analysis tools and scripts"),
license="MIT",
classifiers=["Topic :: Scientific :: Astronomy",
"Intended Audience :: Science/Research"],
url="https://github.com/nicolaschotard/Clusters",
author="Nicolas Chotard, Dominique Boutigny, Celine Combet, Douglas Applegate",
author_email="nchotard@in2p3.fr",
packages=packages,
ext_modules=cythonize(extensions),
scripts=scripts,
package_data=package_data,
long_description=str(open(README, 'rb').read()),
setup_requires=['pytest-runner'],
tests_require=['pytest'])