-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
62 lines (54 loc) · 1.62 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
from distutils.core import setup, Extension
from Cython.Build import cythonize
import sys
import numpy
import os
from pathlib import Path
sys.argv = ['setup.py', 'build_ext', '--inplace']
conda_base = os.getenv('CONDA_PREFIX')
lib_path = os.path.join(conda_base, 'lib')
rdkit_include_path = os.path.join(conda_base, 'include', 'rdkit')
# RDKit paths
# rdkit_include_path = '/home/ergot/miniforge3/pkgs/rdkit-2023.09.6-py310hde493be_2/include/rdkit'
# lib_path = '/home/ergot/miniforge3/pkgs/rdkit-2023.09.6-py310hde493be_2/lib'
# Set Boost include and library paths
# boost_include = "/usr/local/include" # Replace with your Boost include path
# boost_library_path = "/usr/local/lib" # Replace with your Boost library path
# Define the Cython extension
extensions = [
Extension(
name="chemivec",
sources=["*.pyx"], # Replace with your actual Cython file name
extra_compile_args=[
'-O3',
'-fopenmp',
],
extra_link_args=[
'-fopenmp'
],
include_dirs=[
numpy.get_include(),
rdkit_include_path,
# boost_include,
],
library_dirs=[
lib_path,
# boost_library_path
],
libraries=[
"RDKitRDGeneral",
"RDKitDataStructs",
# "boost_numpy310",
"boost_python310",
],
language="c++",
),
]
# Setup
setup(
name="chemivec",
ext_modules=cythonize(extensions, language_level = "3str"),
# define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")]
)
from chemivec import run_tests
run_tests()