Permalink
Browse files

Changed py2exe build process to start from dist rather than remaking …

…the dist on windows

* moved helper files into py2exe directory so they get included in source dist
* added checks to make sure not attempting to build py2exe in a copy of the code that's under version control
* note: the process is still started from build-archives.sh, it's just reworked

svn-revision: r2390
  • Loading branch information...
robmcmullen committed Nov 12, 2009
1 parent 74b5dba commit f84acf8b02ffb3a6e32d3f428c078e5e6a38980e
@@ -44,7 +44,7 @@ if [ -f archive/$PEPPYWIN ]
then
echo FOUND $PEPPYWIN
else
rsync -av -e 'ssh -p 2222' --exclude="archive" --exclude="api" --exclude="dist" --exclude="peppy-*" ~/src/peppy rob@localhost:/home/Rob/
ssh -p 2222 localhost bash peppy/build-peppy-for-windows-over-ssh.sh
scp -P 2222 localhost:peppy/peppy-$VERSION/py2exe/$PEPPYWIN archive
scp -P 2222 archive/$PEPPYSRC py2exe/build-over-ssh.sh localhost:
ssh -p 2222 localhost bash build-over-ssh.sh peppy-$VERSION
scp -P 2222 localhost:peppy-$VERSION/py2exe/$PEPPYWIN archive
fi

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,26 @@
#!/bin/bash
# Designed to be called from an ssh session. An argument must be passed to the
# script indicating the root of the compressed archive.
ROOT=$1
if [ ! -f $ROOT.tar.* ]
then
echo "Source archive for $ROOT doesn't exist. Not building."
exit -1
fi
if rm -rf $ROOT
then
:
else
echo "Failed removing $ROOT. Someone using that directory?"
exit -1
fi
bzcat $ROOT.* | tar xf -
cd $ROOT
bash py2exe/prepare-distdir.sh
bash py2exe/build-py2exe.sh
@@ -0,0 +1,9 @@
#!/bin/bash
python setup.py py2exe
# The following DLLs are needed for Vista support
cp c:/python25/lib/site-packages/wx-2.8-msw-unicode/wx/MSVCP71.dll dist
cp c:/python25/lib/site-packages/wx-2.8-msw-unicode/wx/gdiplus.dll dist
/program-files/NSIS/makensis py2exe/win-installer.nsi
chmod 755 py2exe/*.exe
File renamed without changes.
@@ -0,0 +1,57 @@
#!/bin/bash
#
# Modify the distdir in preparation for a py2exe
# First, verify that we are being called in the root directory, not the py2exe
# directory.
if [ ! -f setup.py ]
then
cd ..
if [ ! -f setup.py ]
then
echo "Must be called from inside root peppy directory"
exit 1
fi
fi
echo "Found working directory $PWD"
# Don't run this on the version control directory; only run this on a directory
# that has a version number -- i.e. one that has been created by 'make distdir'
if [ -d .git -o -d .svn -o -d .peppy-project -o -d i18n.in ]
then
echo
echo "ERROR! Don't call this from a version that you are editing!"
echo "This is designed to modify an unzipped source distribution in place"
echo "to create the directory structure needed to build a one-off py2exe"
echo "installer."
exit 2
fi
mv peppy/hsi/hsi_plugin.py peppy/plugins
mv peppy/hsi/hsi_plugin.peppy-plugin peppy/plugins
mv peppy/project/project_plugin.py peppy/plugins
mv peppy/project/project_plugin.peppy-plugin peppy/plugins
# Create the eggs directory that will be used to store plugins
mkdir eggs
touch eggs/__init__.py
# Unzip the platform independent eggs
ls -1 peppy/plugins/eggs/*py2.5.egg | while read EGG; do
unzip -o $EGG -d eggs
done
# add the platform independent eggs to the py2exe include list
./py2exe/prepare-plugin-list.py -i . -d peppy/major_modes -d peppy/plugins -e eggs
# Handle eggs with compiled objects. They don't seem to do well when placed in
# the eggs directory -- they need to be in the top level directory
ls -1 peppy/plugins/eggs/*win32.egg | while read EGG; do
unzip -o $EGG
cat EGG-INFO/top_level.txt | while read TOPLEVEL; do
echo "import $TOPLEVEL" >> peppy/py2exe_plugins.py
done
done
rm peppy/plugins/eggs/*.egg
File renamed without changes.
@@ -11,7 +11,7 @@ SetCompressor lzma
Name 'Peppy'
OutFile ${exe}
SilentInstall silent
Icon '..\..\graphics\peppy48.ico'
Icon 'peppy48.ico'
RequestExecutionLevel user
Section
@@ -16,8 +16,8 @@ SetCompressor lzma
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "..\..\graphics\peppy48.ico"
!define MUI_UNICON "..\..\graphics\peppy48.ico"
!define MUI_ICON "peppy48.ico"
!define MUI_UNICON "peppy48.ico"
; Welcome page
!insertmacro MUI_PAGE_WELCOME
@@ -310,7 +310,7 @@ def findHelpBooks():
platform_kwargs['windows'] = [
{"script": "py2exe/peppy.py",
"other_resources": [(24,1,manifest)],
"icon_resources": [(2, "../graphics/peppy48.ico")],
"icon_resources": [(2, "py2exe/peppy48.ico")],
}
]
platform_kwargs['zip_safe'] = False

0 comments on commit f84acf8

Please sign in to comment.