-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
57 lines (46 loc) · 1.66 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
from setuptools.command.build_ext import build_ext
from distutils.core import setup, Extension
import platform
import sys
from sysconfig import get_config_var, get_paths
import logging
__version__ = '0.0.1'
def get_include():
info = get_paths()
seqan_path = '/'.join(info['include'].split('/')[:-1])
# seqan_path += '/seqan'
return seqan_path
def __extra_compile_args():
extra_compile_args = []
if platform.system() == 'Darwin':
extra_compile_args = ["-std=c++14"]
else:
extra_compile_args = ["-fopenmp", "-std=c++14"]
return extra_compile_args
def __extra_link_args():
extra_link_args = []
if platform.system() != 'Darwin':
extra_link_args = ["-lgomp", "-lm", "-lrt"]
return extra_link_args
sources_list = ['src/hicbuildmatrix_interface.cpp', 'src/hicbuildmatrix.cpp']
depends_list = ['src/hicbuildmatrix.hpp']
module_hicbuildmatrix = Extension('hicBuildMatrixCpp',
sources=sources_list,
depends = depends_list,
include_dirs=[
# Path to eigen3 headers
get_include()
],
extra_link_args=__extra_link_args(),
extra_compile_args=__extra_compile_args()
)
setup(
name='hicBuildMatrixCpp',
version=__version__,
author='Klesta Toti, Joachim Wolff',
author_email='[email protected]',
description='A c++ extension for python to create a Hi-C interaction matrix',
ext_modules=[module_hicbuildmatrix],
install_requires=['pybind11>=2.2'],
headers = ['src/krbalancing.hpp']
)