Skip to content

Commit ea1c0b5

Browse files
committed
code cleaning
1 parent 001aabf commit ea1c0b5

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
from setuptools import Extension, setup
1212
from setuptools.command.build_ext import build_ext
13-
from setuptools.command.develop import develop
14-
from setuptools.command.install import install
1513

1614

1715
CNS_BINARIES = {
@@ -40,6 +38,7 @@ class CustomBuild(build_ext):
4038
"""Custom build handles the C/C++ dependencies"""
4139

4240
def run(self):
41+
"""Run the custom build"""
4342
print("Building HADDOCK3 C/C++ binary dependencies...")
4443
self.build_executable(
4544
name="contact_fcc",
@@ -59,10 +58,10 @@ def run(self):
5958
"-lm",
6059
],
6160
)
62-
61+
print("Downloading the CNS binary...")
6362
self.download_cns()
6463

65-
# Run the standard build_ext
64+
# Run the standard build
6665
build_ext.run(self)
6766

6867
def build_executable(self, name, cmd):
@@ -92,6 +91,7 @@ def build_executable(self, name, cmd):
9291
raise
9392

9493
def download_cns(self):
94+
"""Helper function to download the CNS binary"""
9595

9696
arch = self.get_arch()
9797

@@ -113,7 +113,7 @@ def download_cns(self):
113113
# Make it executable
114114
os.chmod(cns_exec, 0o755)
115115

116-
# check if this is being done via `pip install .`
116+
# If build_lib exists, also copy to there
117117
if hasattr(self, "build_lib"):
118118
install_bin_dir = Path(self.build_lib, "haddock", "bin")
119119
install_bin_dir.mkdir(exist_ok=True, parents=True)

src/haddock/core/defaults.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414

1515
cns_exec = Path(files(haddock).joinpath("bin/cns")) # type: ignore
16-
log.warning(cns_exec)
1716
if not cns_exec.exists():
1817
log.warning("CNS executable not found at %s", cns_exec)
1918
_cns_exec = os.environ.get("CNS_EXEC")
@@ -26,9 +25,7 @@
2625
cns_exec = Path(_cns_exec)
2726

2827
CONTACT_FCC_EXEC = Path(files("haddock").joinpath("bin/contact_fcc")) # type: ignore
29-
log.warning(CONTACT_FCC_EXEC)
3028
FAST_RMSDMATRIX_EXEC = Path(files("haddock").joinpath("bin/fast-rmsdmatrix")) # type: ignore
31-
log.warning(FAST_RMSDMATRIX_EXEC)
3229

3330
MODULE_PATH_NAME = "step_"
3431
"""

0 commit comments

Comments
 (0)