Skip to content
Snippets Groups Projects
Commit e2900de9 authored by Martyn Gigg's avatar Martyn Gigg
Browse files

Add mantidqt dependency to workbench setup.py

pkg_resources will ensure that the listed dependencies are importable
at start up time. This method supports -egg.link files correctly too.
Refs #20381
parent 7357f0ec
No related branches found
No related tags found
No related merge requests found
......@@ -9,15 +9,20 @@ function ( add_python_package pkg_name )
set ( _setup_py ${CMAKE_CURRENT_SOURCE_DIR}/setup.py )
set ( _egg_link_dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR} )
set ( _egg_link ${_egg_link_dir}/${pkg_name}.egg-link )
add_custom_command ( OUTPUT ${_egg_link}
set ( _startup_script ${_egg_link_dir}/${pkg_name} )
if ( WIN32 )
set ( _startup_script ${_startup_script}.exe )
endif ()
add_custom_command ( OUTPUT ${_egg_link} ${_startup_script}
COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH=${_egg_link_dir}
${PYTHON_EXECUTABLE} ${_setup_py} develop
--install-dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}
--script-dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${_setup_py}
)
add_custom_target ( ${pkg_name} ALL
DEPENDS ${_egg_link}
DEPENDS ${_egg_link_dir}/${pkg_name} ${_egg_link}
)
endfunction ()
......
......@@ -21,6 +21,7 @@ from setuptools import setup
# The most basic setup possible to be able to use setup.py develop
setup(
name="workbench",
install_requires=['mantidqt'],
entry_points={
'gui_scripts': [
'workbench = workbench.app.mainwindow:main'
......
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