Skip to content
Snippets Groups Projects
Commit 6f333b85 authored by Marina Ganeva's avatar Marina Ganeva
Browse files

Fixed packaging of nxs.

parent 17f784ee
No related branches found
No related tags found
No related merge requests found
......@@ -120,15 +120,3 @@ if(COMMAND CMAKE_POLICY)
endif(COMMAND CMAKE_POLICY)
# MAKE_VATES does not work with macports
# the code below is needed to fix the problem with 'import nxs'
# the bundle contains the libNeXus.0.dylib,
# but 'import nxs' requires libNeXus.dylib
set( legacy_link ${bundle}/Contents/MacOS/libNeXus.dylib)
set( legacy_target ${bundle}/Contents/MacOS/libNeXus.0.dylib)
add_custom_command( OUTPUT ${legacy_link} POST_BUILD
COMMAND ln -s ${legacy_target} ${legacy_link}
DEPENDS install ${legacy_target}
COMMENT "Generating legacy symbolic link")
add_custom_target( install_legacy DEPENDS ${legacy_link} )
......@@ -18,6 +18,8 @@ PYTHON_LIBRARIES = ['sphinx', 'sphinx_bootstrap_theme', 'IPython', 'zmq', 'pygme
# by default the nexus library installs it here
sys.path.append('/opt/local/lib/python2.7/site-packages/')
# names of the nexus libraries for symlinks
NEXUSLIBS = {"libNeXus.0.dylib": "libNeXus.dylib", "libNeXusCPP.0.dylib": "libNeXusCPP.dylib"}
def copy_directory(src, dest):
"""
......@@ -61,6 +63,12 @@ if __name__ == '__main__':
else:
copy_directory(module[0].__path__[0], os.path.join(OUTPUT_PATH, lib))
# create symlinks for NEXUSLIBS
for nlib in NEXUSLIBS.keys():
libnexus_src = os.path.join(OUTPUT_PATH, nlib)
libnexus_dst = os.path.join(OUTPUT_PATH, NEXUSLIBS[nlib])
os.symlink(libnexus_src, libnexus_dst)
# copy ipython (although I do not understand why)
# find ipython executable
IPYTHON_EXECUTABLE = find_executable('ipython')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment