[CMake] Embedding Python in macOS bundle
Adam Wolf
adamwolf at feelslikeburning.com
Sat Mar 18 15:51:33 EDT 2017
Hi folks!
I work on a relatively large cross-platform project which uses CMake.
Currently, the macOS version uses the system Python.
I'm working on embedding a Python inside the bundle. I compiled
Python with --enable-framework, stored it in my home directory and
aimed CMake at it. I added a few directories to the dirs parameter of
fixup_bundle, but fixup_bundle doesn't seem to be pulling it in.
-- Analyzing app='/Users/wolf/wnl/kicad/kicadmacbuilder/silly/bin/kicad.app/Contents/MacOS/kicad'
-- bundle='/Users/wolf/wnl/kicad/kicadmacbuilder/silly/bin/kicad.app'
-- executable='/Users/wolf/wnl/kicad/kicadmacbuilder/silly/bin/kicad.app/Contents/MacOS/kicad'
-- valid='1'
-- executable file 1:
/Users/wolf/wnl/kicad/kicadmacbuilder/silly/bin/kicad.app/Contents/MacOS/dxf2idf
-- executable file 2:
/Users/wolf/wnl/kicad/kicadmacbuilder/silly/bin/kicad.app/Contents/MacOS/idf2vrml
-- executable file 3:
/Users/wolf/wnl/kicad/kicadmacbuilder/silly/bin/kicad.app/Contents/MacOS/idfcyl
-- executable file 4:
/Users/wolf/wnl/kicad/kicadmacbuilder/silly/bin/kicad.app/Contents/MacOS/idfrect
-- executable file 5:
/Users/wolf/wnl/kicad/kicadmacbuilder/silly/bin/kicad.app/Contents/MacOS/kicad
-- executable file 6:
/Users/wolf/wnl/kicad/kicadmacbuilder/silly/bin/kicad.app/Contents/MacOS/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-- verified='0'
-- info='external prerequisites found:
f='/Users/wolf/wnl/kicad/kicadmacbuilder/silly/bin/kicad.app/Contents/MacOS/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python'
external_prereqs='/Users/wolf/wnl/kicad/kicadmacbuilder/silly/python-build//Python.framework/Versions/2.7/Python'
'
--
CMake Error at /usr/local/Cellar/cmake/3.6.3/share/cmake/Modules/BundleUtilities.cmake:1053
(message):
error: verify_app failed
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.6.3/share/cmake/Modules/BundleUtilities.cmake:912
(verify_app)
kicad/cmake_install.cmake:91 (fixup_bundle)
cmake_install.cmake:69 (include)
I tried setting BU_COPY_FULL_FRAMEWORK_CONTENTS, mostly for giggles,
and I had similar issues.
Anyone have any thoughts or suggestions? Am I barking up the wrong
tree with --enable-framework? Anyone have any examples or projects
that have pulled in Python using CMake and fixup_bundle?
Thanks!
Adam Wolf
More information about the CMake
mailing list