forked from PolyChord/PolyChordLite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
42 lines (35 loc) · 1.19 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
from setuptools import setup, Extension
import os
import numpy
def readme():
with open('pypolychord_README.rst') as f:
return f.read()
def get_version(short=False):
with open('src/polychord/feedback.f90') as f:
for line in f:
if 'version' in line:
return line[44:48]
pypolychord_module = Extension(
name='_pypolychord',
library_dirs=[os.path.join(os.getcwd(), 'lib')],
include_dirs=[os.path.join(os.getcwd(), 'src/polychord/'),
numpy.get_include()],
runtime_library_dirs=[os.path.join(os.getcwd(), 'lib')],
libraries=['chord'],
sources=[os.path.join(os.getcwd(),
'pypolychord/_pypolychord.cpp')]
)
setup(name='pypolychord',
version=get_version(),
description='Python interface to PolyChord 1.14',
url='https://ccpforge.cse.rl.ac.uk/gf/project/polychord/',
author='Will Handley',
author_email='wh260@cam.ac.uk',
license='PolyChord',
packages=['pypolychord'],
install_requires=[
'numpy',
],
extras_require={'plotting': 'getdist'},
ext_modules=[pypolychord_module],
zip_safe=False)