Unverified Commit fe5bc214 authored by Peterson, Peter's avatar Peterson, Peter Committed by GitHub
Browse files

Merge pull request #32109 from peterfpeterson/setuptools_ornlnext

Add support for setuptools >= 49 (ornlnext)
parents 2ea5d43d 903f3815
......@@ -100,6 +100,18 @@
"OSX_INSTALL_RPATH": "+",
"LINUX_INSTALL_RPATH": "+"
}
},
"add_python_package": {
"kwargs": {
"EGGLINKNAME": 1,
"INSTALL_LIB_DIRS": "+",
"INSTALL_BIN_DIR": 1,
"EXCLUDE_ON_INSTALL": "+"
},
"flags": [
"EXECUTABLE",
"GENERATE_SITECUSTOMIZE"
]
}
},
"always_wrap": [],
......
......@@ -102,8 +102,6 @@ build/
Framework/Kernel/inc/MantidKernel/GitHubApiHelper.h
qt/python/mantidqt/resources.py
qt/applications/workbench/workbench/app/resources.py
qt/applications/workbench/setup.py
qt/python/setup.py
# Visual C++ cache files
ipch/
......
setup.py
mantid/pyversion.py
mantid/buildconfig.py
mantid/kernel/mpisetup.py
mantid/kernel/packagesetup.py
\ No newline at end of file
mantid/kernel/packagesetup.py
......@@ -108,9 +108,14 @@ if(APPLE)
else()
set(_install_lib_dirs "${SITE_PACKAGES}")
endif()
add_python_package(
PythonInterface EGGLINKNAME mantid INSTALL_LIB_DIRS ${_install_lib_dirs}
PythonInterface
EGGLINKNAME mantid
INSTALL_LIB_DIRS ${_install_lib_dirs}
GENERATE_SITECUSTOMIZE
)
set_property(TARGET PythonInterface PROPERTY FOLDER "MantidFramework/Python")
add_dependencies(
PythonInterface
......@@ -150,7 +155,11 @@ add_subdirectory(test)
# Python algorithms
mtd_install_dirs(
DIRECTORY plugins/
INSTALL_DIRS ${PLUGINS_DIR}/python ${WORKBENCH_PLUGINS_DIR}/python
EXCLUDE "*.pyc"
DIRECTORY
plugins/
INSTALL_DIRS
${PLUGINS_DIR}/python
${WORKBENCH_PLUGINS_DIR}/python
EXCLUDE
"*.pyc"
)
......@@ -6,15 +6,14 @@
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
# This file is part of the mantid workbench.
import os
from setuptools import find_packages, setup
@SETUPTOOLS_BUILD_COMMANDS_DEF@
# The most basic setup possible to be able to use setup.py develop
# The most basic setup possible to be able to use pip develop/install
setup(
name='mantid',
version='@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@@VERSION_TWEAK_PY@',
version=os.environ['MANTID_VERSION_STR'],
packages=find_packages(exclude=['*.test', 'plugins*']),
package_data={'': ['*.ui']},
@SETUPTOOLS_BUILD_COMMANDS_USE@
)
# ##############################################################################
# Configure required dependencies if necessary
# ##############################################################################
if(MSVC)
if(MSVC AND NOT CONDA_BUILD)
# Git LFS does not work properly with <= 1.9
find_package(Git 1.9.5 REQUIRED)
find_package(GitLFS REQUIRED)
......@@ -15,7 +15,7 @@ if(MSVC)
set(THIRD_PARTY_GIT_URL
"https://github.com/mantidproject/thirdparty-msvc2015.git"
)
set(THIRD_PARTY_GIT_SHA1 913585ad3212c6fa6bd6f9c54cde473fa171ff54)
set(THIRD_PARTY_GIT_SHA1 0a4c81cb2a6809125867022d2d5320c22075a0c6)
set(THIRD_PARTY_DIR ${EXTERNAL_ROOT}/src/ThirdParty)
# Generates a script to do the clone/update in tmp
set(_project_name ThirdParty)
......@@ -115,8 +115,8 @@ if(MSVC)
# Add to the path so that cmake can configure correctly without the user
# having to do it
set(ENV{PATH} "${THIRD_PARTY_BIN};$ENV{PATH}")
# Set PATH for custom command or target build steps. Avoids the need to
# make external PATH updates
# Set PATH for custom command or target build steps. Avoids the need to make
# external PATH updates
set(CMAKE_MSVCIDE_RUN_PATH ${THIRD_PARTY_BIN})
# Set variables to help CMake find components
......@@ -127,7 +127,20 @@ if(MSVC)
set(BOOST_INCLUDEDIR "${CMAKE_INCLUDE_PATH}")
set(BOOST_LIBRARYDIR "${CMAKE_LIBRARY_PATH}")
set(Boost_NO_SYSTEM_PATHS TRUE)
elseif(MSVC AND CONDA_BUILD)
# Print out where we are looking for 3rd party stuff
set(Python_FIND_REGISTRY NEVER)
# used in later parts for MSVC to bundle Python
set(MSVC_PYTHON_EXECUTABLE_DIR $ENV{CONDA_PREFIX})
set(THIRD_PARTY_BIN
"$ENV{CONDA_PREFIX}/Library/bin;$ENV{CONDA_PREFIX}/Library/lib;${MSVC_PYTHON_EXECUTABLE_DIR}"
)
# Add to the path so that cmake can configure correctly without the user
# having to do it
set(ENV{PATH} "${THIRD_PARTY_BIN};$ENV{PATH}")
# Set PATH for custom command or target build steps. Avoids the need to make
# external PATH updates
set(CMAKE_MSVCIDE_RUN_PATH ${THIRD_PARTY_BIN})
else()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# Homebrew adds qt4 here and we require it to be unlinked from /usr/local to
......@@ -166,12 +179,28 @@ endfunction()
# Find python interpreter
set(MINIMUM_PYTHON_VERSION 3.6)
find_package(Python ${MINIMUM_PYTHON_VERSION} REQUIRED
COMPONENTS Interpreter Development NumPy)
# If anything external uses find_package(PythonInterp) then make sure it finds the correct version and executable
set(Python3_ROOT_DIR $ENV{CONDA_PREFIX})
find_package(
Python ${MINIMUM_PYTHON_VERSION} REQUIRED COMPONENTS Interpreter Development
NumPy
)
# If anything external uses find_package(PythonInterp) then make sure it finds
# the correct version and executable
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
set(Python_ADDITIONAL_VERSIONS ${Python_VERSION_MAJOR}.${Python_VERSION_MINOR})
# Search for the pythonw executable if it has not already been found Will only
# look in the folder containing the current python.exe
if(NOT Python_W_EXECUTABLE)
get_filename_component(Python_Binary_Dir ${PYTHON_EXECUTABLE} DIRECTORY)
find_program(
Python_W_EXECUTABLE
PATHS ${Python_Binary_Dir}
NAMES pythonw
NO_DEFAULT_PATH
)
endif()
# Handle switching between previously configured Python verions
if(Python_INCLUDE_DIR
AND NOT Python_INCLUDE_DIR MATCHES
......@@ -180,5 +209,19 @@ if(Python_INCLUDE_DIR
message(
STATUS "Python version has changed. Clearing previous Python configuration."
)
unset_cached_Python_variables()
unset_cached_python_variables()
endif()
# What version of setuptools are we using?
execute_process(
COMMAND ${Python_EXECUTABLE} -c
"import setuptools;print(setuptools.__version__)"
RESULT_VARIABLE _setuptools_version_check_result
OUTPUT_VARIABLE Python_SETUPTOOLS_VERSION
ERROR_VARIABLE _setuptools_version_check_error
)
if(NOT _setuptools_version_check_result EQUAL 0)
message(FATAL_ERROR "Unable to determine setuptools version:\n"
" ${_setuptools_version_check_error}"
)
endif()
# Defines functions to help deal with python packages
# ~~~
# Function to create links to python packages in the source tree
# Function to create links to python packages from the source tree
# to the binary tree. It expects a setup.py to be found in
# ${CMAKE_CURRENT_SOURCE_DIR}/setup.py
# Optional keyword arguments:
# - EXECUTABLE: If this option provided then it is assumed the package contains a
# startup script and this is installed in the package bin
......@@ -12,62 +14,20 @@
# - INSTALL_BIN_DIR: Destination for an executable to be installed
# - EXCLUDE_ON_INSTALL: Specifies a regex of files to exclude from the install
# - command
# - GENERATE_SITECUSTOMIZE: If provided then generate a sitecustomize
# file in the egg link directory
# ~~~
function(
add_python_package
pkg_name
)
# Create a setup.py file if necessary
function(add_python_package pkg_name)
set(_setup_py ${CMAKE_CURRENT_SOURCE_DIR}/setup.py)
set(_setup_py_build_root ${CMAKE_CURRENT_BINARY_DIR})
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in")
set(
SETUPTOOLS_BUILD_COMMANDS_DEF
"def patch_setuptools_command(cmd_cls_name):
import importlib
cmd_module = importlib.import_module('setuptools.command.' + cmd_cls_name)
setuptools_command_cls = getattr(cmd_module, cmd_cls_name)
class CustomCommand(setuptools_command_cls):
user_options = setuptools_command_cls.user_options[:]
boolean_options = setuptools_command_cls.boolean_options[:]
def finalize_options(self):
self.build_lib = '${_setup_py_build_root}/build'
setuptools_command_cls.finalize_options(self)
return CustomCommand
CustomBuildPy = patch_setuptools_command('build_py')
CustomInstall = patch_setuptools_command('install')
CustomInstallLib = patch_setuptools_command('install_lib')
"
)
set(
SETUPTOOLS_BUILD_COMMANDS_USE
"cmdclass={'build_py': CustomBuildPy, 'install': CustomInstall, 'install-lib': CustomInstallLib }"
)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in
${_setup_py}
@ONLY
)
endif()
set(_setup_py_build_root ${CMAKE_CURRENT_SOURCE_DIR}/build)
set(_egg_link_dir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR})
# Create variables for additional arguments
cmake_parse_arguments(
_parsed_arg
"EXECUTABLE"
"EGGLINKNAME;EXCLUDE_FROM_INSTALL;INSTALL_BIN_DIR"
"INSTALL_LIB_DIRS"
_parsed_arg "EXECUTABLE;GENERATE_SITECUSTOMIZE"
"EGGLINKNAME;EXCLUDE_FROM_INSTALL;INSTALL_BIN_DIR" "INSTALL_LIB_DIRS"
${ARGN}
)
# If a custom egg-link name was specified use that for the link
if(_parsed_arg_EGGLINKNAME)
set(_egg_link ${_egg_link_dir}/${_parsed_arg_EGGLINKNAME}.egg-link)
else()
......@@ -92,34 +52,36 @@ CustomInstallLib = patch_setuptools_command('install_lib')
# create the developer setup which just creates a pth file rather than copying
# things over
set(
_outputs
${_egg_link}
${_startup_script}
${_startup_exe}
set(_outputs ${_egg_link} ${_startup_script} ${_startup_exe})
set(_version_str
${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_TWEAK_PY}
)
add_custom_command(
OUTPUT ${_outputs}
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}
${CMAKE_COMMAND} -E env PYTHONPATH=${_egg_link_dir}
MANTID_VERSION_STR=${_version_str} ${Python_EXECUTABLE} ${_setup_py}
develop --install-dir ${_egg_link_dir} --script-dir ${_egg_link_dir}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${_setup_py}
)
add_custom_target(
${pkg_name}
ALL
DEPENDS ${_outputs}
# Generate a sitecustomize.py file in the egg link directory as setuptools no
# longer generates site.py for v>=49.0.0
if(_parsed_arg_GENERATE_SITECUSTOMIZE AND Python_SETUPTOOLS_VERSION
VERSION_GREATER_EQUAL 49.0.0
)
add_custom_command(
OUTPUT ${_egg_link_dir}/sitecustomize.py
COMMAND ${CMAKE_COMMAND} -DSITECUSTOMIZE_DIR=${_egg_link_dir} -P
${CMAKE_MODULE_PATH}/WriteSiteCustomize.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${_setup_py} ${CMAKE_MODULE_PATH}/WriteSiteCustomize.cmake
)
list(APPEND _outputs ${_egg_link_dir}/sitecustomize.py)
endif()
add_custom_target(${pkg_name} ALL DEPENDS ${_outputs})
# setuptools by default wants to build into a directory called 'build'
# relative the to the working directory. We have overridden commands in
......@@ -128,47 +90,36 @@ CustomInstallLib = patch_setuptools_command('install_lib')
# --install-lib=lib removes any of the platform/distribution specific install
# directories so we can have a flat structure
install(
CODE
"execute_process(COMMAND ${Python_EXECUTABLE} ${_setup_py} install -O1 --single-version-externally-managed --root=${_setup_py_build_root}/install --install-scripts=bin --install-lib=lib WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})"
CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E env MANTID_VERSION_STR=${_version_str} \
${Python_EXECUTABLE} ${_setup_py} install -O1 --single-version-externally-managed \
--root=${_setup_py_build_root}/install --install-scripts=bin --install-lib=lib \
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})"
)
# Registers the "installed" components with CMake so it will carry them over
if(_parsed_arg_EXCLUDE_FROM_INSTALL)
foreach(
_dest
${_parsed_arg_INSTALL_LIB_DIRS}
)
foreach(_dest ${_parsed_arg_INSTALL_LIB_DIRS})
install(
DIRECTORY ${_setup_py_build_root}/install/lib/
DESTINATION ${_dest}
PATTERN
"test"
EXCLUDE
REGEX
"${_parsed_arg_EXCLUDE_FROM_INSTALL}"
EXCLUDE
PATTERN "test" EXCLUDE
REGEX "${_parsed_arg_EXCLUDE_FROM_INSTALL}" EXCLUDE
)
endforeach()
else()
foreach(
_dest
${_parsed_arg_INSTALL_LIB_DIRS}
)
foreach(_dest ${_parsed_arg_INSTALL_LIB_DIRS})
install(
DIRECTORY ${_setup_py_build_root}/install/lib/
DESTINATION ${_dest}
PATTERN
"test"
EXCLUDE
PATTERN "test" EXCLUDE
)
endforeach()
endif()
# install the generated executable
if(_parsed_arg_EXECUTABLE AND _parsed_arg_INSTALL_BIN_DIR)
install(
PROGRAMS ${_setup_py_build_root}/install/bin/${pkg_name}
DESTINATION ${_parsed_arg_INSTALL_BIN_DIR}
)
install(PROGRAMS ${_setup_py_build_root}/install/bin/${pkg_name}
DESTINATION ${_parsed_arg_INSTALL_BIN_DIR}
)
endif()
endfunction()
# CMake script to generate a Python sitecustomize.py file at build time It is
# intended to be used via cmake -P (script mode)
file(
WRITE ${SITECUSTOMIZE_DIR}/sitecustomize.py
"
import site
site.addsitedir('${SITECUSTOMIZE_DIR}')
"
)
......@@ -19,7 +19,6 @@ AT_RPATH_TAG = '@rpath'
# Collection modules to copy from system installation
# Required to install other packages with pip
BUNDLED_PY_MODULES_COMMON = [
'easy_install.py',
'pip',
'pip*.*-info',
'pkg_resources',
......@@ -28,43 +27,49 @@ BUNDLED_PY_MODULES_COMMON = [
'wheel',
'wheel*.*-info'
].freeze
# Brew Python packages to be copied to bundle
BUNDLED_PY_MODULES_MANTIDPLOT = [
'PyQt4/__init__.py',
'PyQt4/Qt.so',
'PyQt4/QtCore.so',
'PyQt4/QtGui.so',
'PyQt4/QtOpenGL.so',
'PyQt4/QtSql.so',
'PyQt4/QtSvg.so',
'PyQt4/QtXml.so',
'PyQt4/sip.so',
'PyQt4/uic'
].freeze
BUNDLED_PY_MODULES_WORKBENCH = [
'PyQt5/__init__.py',
'PyQt5/Qt.so',
'PyQt5/QtCore.so',
'PyQt5/QtGui.so',
'PyQt5/QtOpenGL.so',
'PyQt5/QtPrintSupport.so',
'PyQt5/QtSql.so',
'PyQt5/QtSvg.so',
'PyQt5/QtTest.so',
'PyQt5/QtWidgets.so',
'PyQt5/QtXml.so',
'PyQt5/sip.so',
'PyQt5/Qt.*so',
'PyQt5/QtCore.*so',
'PyQt5/QtGui.*so',
'PyQt5/QtOpenGL.*so',
'PyQt5/QtPrintSupport.*so',
'PyQt5/QtSql.*so',
'PyQt5/QtSvg.*so',
'PyQt5/QtTest.*so',
'PyQt5/QtWidgets.*so',
'PyQt5/QtXml.*so',
'PyQt5/sip.*so',
'PyQt5/uic',
].freeze
REQUIREMENTS_FILE = Pathname.new(__dir__) + 'requirements.txt'
REQUIREMENTS_WORKBENCH_FILE = Pathname.new(__dir__) + 'requirements-workbench.txt'
# Python requirements. Versions hard pinned to those
# used by the host at install time
REQUIREMENTS=[
"h5py",
"ipython",
"ipykernel",
"matplotlib",
"pycifrw",
"PyYAML",
"pyzmq",
"qtconsole",
"qtpy",
"mock",
"notebook",
"numpy",
"psutil",
"requests",
"scipy",
"six",
"sphinx",
"sphinx_bootstrap_theme",
"toml"
].freeze
SITECUSTOMIZE_FILE = Pathname.new(__dir__) + 'sitecustomize.py'
DEBUG = 1
FRAMEWORK_IDENTIFIER = '.framework'
HOMEBREW_PREFIX = '/usr/local'
MANTID_PY_SO = ['_api.so', '_geometry.so', '_kernel.so'].freeze
QT4_PLUGINS_DIR = Pathname.new('/usr/local/opt/qt@4/lib/qt4/plugins')
QT5_PLUGINS_DIR = Pathname.new('/usr/local/opt/qt/plugins')
QT_PLUGINS_COMMON = ['imageformats', 'sqldrivers', 'iconengines'].freeze
QT_PLUGINS_BLACKLIST = ['libqsqlpsql.dylib'].freeze
QT_CONF = '[Paths]
......@@ -122,11 +127,11 @@ end
# +destination+:: Destination directory for bundle
# +host_python_exe+:: Executable of Python bundle to copy over
# +bundled_packages+:: A list of packages that should be bundled
# +requirements_files+:: A list of requirements files to install additional packages
# +requirements+:: A list of Python requirements to install additional packages
# returns the bundle site packages directory
def deploy_python_framework(destination, host_python_exe,
bundled_packages,
requirements_files)
requirements)
host_py_home = host_python_exe.realpath.parent.parent
py_ver = host_py_home.basename
bundle_python_framework = destination + 'Frameworks/Python.framework'
......@@ -194,11 +199,8 @@ def deploy_python_framework(destination, host_python_exe,
make_writable(bundle_site_packages)
# remove distutils.cfg so pip paths are computed relative to the sys.prefix
FileUtils.rm Pathname.new("#{bundle_py_home}/lib/python#{py_ver}/distutils/distutils.cfg")
requirements_files.each do |requirements|
stdout = execute("#{bundle_py_home}/bin/python -m pip install -r #{requirements}")
debug(stdout)
end
install_requirements(requirements, "#{bundle_py_home}/bin/python", host_python_exe)
# fix mpl_toolkit if it is missing __init__
mpltoolkit_init =
FileUtils.touch "#{bundle_site_packages}/mpl_toolkits/__init__.py"
......@@ -210,6 +212,20 @@ def deploy_python_framework(destination, host_python_exe,
bundle_site_packages
end
# Installs the list of Python requirements into the package bundle
# Params:
# +requirements+:: A list of string requirements
# +bundle_py_exe+:: Path to the bundled Python exe
# +host_py_exe+:: Path to the host Python exe
def install_requirements(requirements, bundle_py_exe, host_py_exe)
requirements.each do |requirement|
pkg_info = execute("#{host_py_exe} -m pip show #{requirement}")
version = /Version:\s+([0-9]+\.[0-9]+\.[0-9]+)/.match(pkg_info)[1]
stdout = execute("#{bundle_py_exe} -m pip install --disable-pip-version-check #{requirement}==#{version}")
debug(stdout)
end
end
# Copies, recursively, the selected list of packages from the
# src to the destination. The destination must already exist
# Params:
......@@ -546,16 +562,19 @@ end
#---------------------------------------------------------
# Main script
#---------------------------------------------------------
if (ARGV.length != 2)
puts 'Usage: make_package bundle-path python-exe'
if (ARGV.length != 3)
puts 'Usage: make_package bundle-path python-exe qt-prefix'
puts ' - bundle-path: Path of bundle to fix'
puts ' - python-exe: Path to Python executable to bundle. The whole Python.framework is bundled.'
puts ' - qt-prefix: Root directory of the Qt installation'
exit 1
end
# Host paths
host_python_exe = Pathname.new(ARGV[1])
fatal("Python executable #{python_exe} not found") unless host_python_exe.exist?
host_qt_prefix = Pathname.new(ARGV[2])
fatal("Qt prefix #{host_qt_prefix} not found") unless host_qt_prefix.exist?
# Bundle paths
bundle_path = Pathname.new(ARGV[0])
......@@ -572,27 +591,20 @@ python_version_minor = python_version_full[1]
so_suffix = ''
bundled_packages = BUNDLED_PY_MODULES_COMMON.map { |s| s % "cpython-%d%d%s-darwin" % [python_version_major, python_version_minor, so_suffix] }
requirements_files = [REQUIREMENTS_FILE]
# check we have a known bundle
if bundle_path.to_s.include?('MantidWorkbench')
bundled_packages += BUNDLED_PY_MODULES_WORKBENCH
requirements_files << REQUIREMENTS_WORKBENCH_FILE
bundled_qt_plugins = QT_PLUGINS_COMMON + ['platforms', 'printsupport', 'styles']
host_qt_plugins_dir = QT5_PLUGINS_DIR
host_qt_plugins_dir = host_qt_prefix + 'plugins'
executables << "#{contents_macos}/#{bundle_path.basename.to_s.split('.')[0]}"
elsif bundle_path.to_s.include?('MantidPlot')
bundled_packages += BUNDLED_PY_MODULES_MANTIDPLOT
bundled_qt_plugins = QT_PLUGINS_COMMON
host_qt_plugins_dir = QT4_PLUGINS_DIR
executables << "#{contents_macos}/MantidPlot"
else
fatal("Unknown bundle type #{bundle_path}. Expected MantidPlot.app or MantidWorkbench.app.")
fatal("Unknown bundle type #{bundle_path}. Expected MantidWorkbench.app.")
end
# We start with the assumption CMake has installed all required target libraries/executables
# into the bundle and the main layout exists.
bundle_py_site_packages = deploy_python_framework(contents, host_python_exe,
bundled_packages, requirements_files)
bundled_packages, REQUIREMENTS)
install_qt_plugins(bundle_path, bundled_qt_plugins, host_qt_plugins_dir,
QT_PLUGINS_BLACKLIST)
......
h5py==2.10.0
ipython==7.14.0
matplotlib==3.1.3
pycifrw==4.4.1
PyYAML==5.4
pyzmq==20.0.0
qtconsole==4.7.3
qtpy==1.9.0
mock==4.0.2
notebook==6.1.5
numpy==1.18.4
requests==2.23.0
scipy==1.6.2
six==1.14.0
sphinx==1.6.7
sphinx_bootstrap_theme==0.7.1
toml==0.10.0
......@@ -126,17 +126,21 @@ if(APPLE)
configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/../../../installers/MacInstaller/Info.plist.in
${CMAKE_CURRENT_BINARY_DIR}/Info.plist
@ONLY )
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/Info.plist DESTINATION ${WORKBENCH_BUNDLE} )
install (CODE "
execute_process(COMMAND ${CMAKE_SOURCE_DIR}/installers/MacInstaller/make_package.rb
\${CMAKE_INSTALL_PREFIX}/${WORKBENCH_APP} ${Python_EXECUTABLE}
RESULT_VARIABLE install_name_tool_result OUTPUT_VARIABLE _out ERROR_VARIABLE _out COMMAND_ECHO STDOUT)
if(NOT install_name_tool_result EQUAL 0)
message(\"\${_out}\")
message(FATAL_ERROR \"Package script failed!!!\n\")
endif()
")
# Determine Qt install prefix
set(_qt_install_prefix ${Qt5Core_DIR})