10
10
11
11
from setuptools import Extension , setup
12
12
from setuptools .command .build_ext import build_ext
13
- from setuptools .command .develop import develop
14
- from setuptools .command .install import install
15
13
16
14
17
15
CNS_BINARIES = {
@@ -40,6 +38,7 @@ class CustomBuild(build_ext):
40
38
"""Custom build handles the C/C++ dependencies"""
41
39
42
40
def run (self ):
41
+ """Run the custom build"""
43
42
print ("Building HADDOCK3 C/C++ binary dependencies..." )
44
43
self .build_executable (
45
44
name = "contact_fcc" ,
@@ -59,10 +58,10 @@ def run(self):
59
58
"-lm" ,
60
59
],
61
60
)
62
-
61
+ print ( "Downloading the CNS binary..." )
63
62
self .download_cns ()
64
63
65
- # Run the standard build_ext
64
+ # Run the standard build
66
65
build_ext .run (self )
67
66
68
67
def build_executable (self , name , cmd ):
@@ -92,6 +91,7 @@ def build_executable(self, name, cmd):
92
91
raise
93
92
94
93
def download_cns (self ):
94
+ """Helper function to download the CNS binary"""
95
95
96
96
arch = self .get_arch ()
97
97
@@ -113,7 +113,7 @@ def download_cns(self):
113
113
# Make it executable
114
114
os .chmod (cns_exec , 0o755 )
115
115
116
- # check if this is being done via `pip install .`
116
+ # If build_lib exists, also copy to there
117
117
if hasattr (self , "build_lib" ):
118
118
install_bin_dir = Path (self .build_lib , "haddock" , "bin" )
119
119
install_bin_dir .mkdir (exist_ok = True , parents = True )
0 commit comments