Skip to content

Commit

Permalink
patch from Charles
Browse files Browse the repository at this point in the history
  • Loading branch information
wojdyr committed Jul 6, 2022
1 parent a3a4063 commit 0b9e990
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
13 changes: 9 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 3.15)
project(dimple C CXX)

find_package(CCP4 REQUIRED mmdb2 ccp4c clipper-core clipper-ccp4)
include_directories(${CCP4_INCLUDE_DIRS})
add_definitions(-DBUILD_EXE)

find_package(Python ${PYTHON_VERSION} REQUIRED COMPONENTS Interpreter)
if(WIN32)
string(REPLACE "\\" "/" Python_SITELIB "${Python_SITELIB}")
endif(WIN32)

add_executable(find-blobs cxx/find-blobs.cc)
target_link_libraries(find-blobs ${CCP4_LIBRARIES})

Expand All @@ -13,10 +18,10 @@ install(PROGRAMS dimple DESTINATION bin)
if (WIN32)
install(PROGRAMS dimple.bat DESTINATION bin)
endif()
install(FILES ccp4i-dimple.py DESTINATION ${CCP4_PY2_DIR})
install(FILES ccp4i-dimple.py DESTINATION ${Python_SITELIB})
install(FILES __init__.py __main__.py coots.py pdb.py utils.py
cell.py main.py mtz.py workflow.py
DESTINATION ${CCP4_PY2_DIR}/dimple)
DESTINATION ${Python_SITELIB}/dimple)
install(FILES contaminants/__init__.py contaminants/data.py
contaminants/prepare.py
DESTINATION ${CCP4_PY2_DIR}/dimple/contaminants)
DESTINATION ${Python_SITELIB}/dimple/contaminants)
6 changes: 3 additions & 3 deletions workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ def save_output(self, output_dir, basename, remove_long_list=True):
def summary(self):
n = len(self.lines)
if 0 < n <= 3:
return ''.join(self.lines)
return b''.join(self.lines)
elif self.saved_to:
return '-> %s' % self.saved_to
elif n == 0:
return ''
else: # n > 3
return ''.join(self.lines[:3]) + ('%s more lines' % (n-3))
return b''.join(self.lines[:3]) + ('%s more lines' % (n-3))


class Job:
Expand Down Expand Up @@ -154,7 +154,7 @@ def run(self, show_progress=True, new_line=True, may_fail=False):
notes += ['stdout -> %s/%s' % (self.workflow.output_dir,
self.out.saved_to)]
if self.err:
notes += ['stderr:', self.err.summary()]
notes += ['stderr:', str(self.err.summary())]
raise JobError('%s failed (exit status %d)' % (self.name,
self.exit_status),
note='\n'.join(notes))
Expand Down

0 comments on commit 0b9e990

Please sign in to comment.