Commit 4252e4de authored by eric pellegrini's avatar eric pellegrini
Browse files

updated the Darwin ci scripts

parent 34e592db
Pipeline #3055 canceled with stages
in 1 minute and 8 seconds
......@@ -17,7 +17,7 @@ if sys.platform.startswith('darwin'):
u'LSApplicationCategoryType': u''
'argv_emulation': True,
'argv_emulation': False,# has to be False otherwise triggers problems zith wxPython which lose some events that are captured by OS
'iconfile': u'../../../MDANSE/GUI/Icons/mdanse.icns',
'excludes': 'PyQt4',
'matplotlib_backends': '-',
......@@ -26,11 +26,12 @@ if sys.platform.startswith('darwin'):
'bdist_base': '../Build/build',
'dist_dir': '../Build/dist',
'graph': False,
'xref': False
'xref': False,
'packages' : ["MDANSE","MMTK","Scientific"]
options={'py2app': OPTIONS},
files=`ls ./dist/*.so`
files=`ls ./dist/*.dylib`
libs="osx_cocoau_xrc osx_cocoau_webview osx_cocoau_html osx_cocoau_qa osx_cocoau_adv osx_cocoau_core baseu_xml baseu_net baseu"
......@@ -9,7 +9,7 @@ do
chmod 777 $f
for l in $libs
install_name_tool -change /usr/local/opt/wxmac/lib/libwx_$l-3.0.dylib @executable_path/../Frameworks/libwx_$l-3.0.dylib $f
install_name_tool -change /usr/local/lib/libwx_$l-3.0.dylib @executable_path/../Frameworks/libwx_$l-3.0.dylib $f
......@@ -11,7 +11,7 @@ ROUGE="\\033[1;31m"
##Select the build target
# take the latest version of nmoldyn available on the forge
echo -e "$BLEU""Getting last MDANSE revision" "$NORMAL"
......@@ -31,10 +31,10 @@ rm -rf build
rm -rf dist
# Remove previous install of MDANSE
rm /usr/local/bin/mdanse*
rm /usr/local/lib/python2.7/site-packages/MDANSE*.egg-info
rm -rf /usr/local/lib/python2.7/site-packages/MDANSE
rm /Library/Frameworks/Python.framework/Versions/2.7/bin/mdanse*
rm /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MDANSE*.egg-info
rm -rf /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MDANSE
# Build and install MDANSE to the homebrewed python
/usr/local/bin/python build >> BuildServer/Darwin/Scripts/build_log.txt 2>&1
/usr/local/bin/python install >> BuildServer/Darwin/Scripts/build_log.txt 2>&1
/Library/Frameworks/Python.framework/Versions/2.7/bin/python build >> BuildServer/Darwin/Scripts/build_log.txt 2>&1
/Library/Frameworks/Python.framework/Versions/2.7/bin/python install >> BuildServer/Darwin/Scripts/build_log.txt 2>&1
......@@ -36,7 +36,7 @@ export DISTUTILS_DEBUG=0
cd BuildServer/Darwin/Scripts
/usr/local/bin/python py2app >> build_log.txt 2>&1
/usr/local/bin/python py2app
if [[ $rc != 0 ]]; then
......@@ -63,15 +63,22 @@ hdiutil unmount /Volumes/MDANSE -force -quiet
sleep 5
# recipe to make the dmg free from the building machine dependency adapted from
cp -r /usr/local/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ ./dist/
cp /usr/local/Frameworks/Python.framework/Versions/2.7/Resources/ ./dist/
cp /usr/local/Frameworks/Python.framework/Versions/2.7/Python ./dist/
install_name_tool -change /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/Python @executable_path/../Frameworks/Python.framework/Versions/2.7/libpython2.7.dylib ./dist/
# When launching the bundle, the executable target (i.e. MDANSE) modify the python that is shipped with the bundle (si.e. package path, dylib dependencies ...)
# see for technical details
# In our case we also want the user to be able to start directly python without launching the bundle executable (e.g. to run scripts in command line) which is the reason
# why we have to modify the python executable appropriately with the following commands
cp -r /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ ./dist/
rm -rf ./dist/*
cp /Library/Frameworks/Python.framework/Versions/2.7/Resources/ ./dist/
cp /Library/Frameworks/Python.framework/Versions/2.7/Python ./dist/
install_name_tool -change /Library/Frameworks/Python.framework/Versions/2.7/Python @executable_path/../Frameworks/Python.framework/Versions/2.7/libpython2.7.dylib ./dist/
chmod 777 ./dist/
install_name_tool -id @executable_path/../Frameworks/Python.framework/Versions/2.7/libpython2.7.dylib ./dist/
# In order that the modified python in the bundle import the zipped sitepackages located in Contents/Resources we provide a modified that will
# update the sys.path accordingly
cp ../Scripts/ ./dist/
chmod 777 ../Scripts/
......@@ -14,7 +14,7 @@ fi
cd ../..
cd Tests/FunctionalTests/Jobs
nosetests --verbosity=3 --exe -P .
if [ $? -ne 0 ]; then
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment