From e2af7b755746a7269df247418ee383f1eb39c0bc Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Wed, 20 Jul 2011 22:43:49 +0200 Subject: [PATCH] REL: forward port changes to release scripts from 1.6.x branch. --- pavement.py | 22 ++++++++++++++++++---- release.sh | 19 +++++++++++++++++++ 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/pavement.py b/pavement.py index c5a52b45544b..afb177279513 100644 --- a/pavement.py +++ b/pavement.py @@ -101,7 +101,7 @@ RELEASE_NOTES = 'doc/release/2.0.0-notes.rst' # Start/end of the log (from git) -LOG_START = 'svn/tags/1.5.0' +LOG_START = 'v1.6.0' LOG_END = 'master' @@ -398,8 +398,22 @@ def build_pdf(): #------------------ # Mac OS X targets #------------------ -def dmg_name(fullversion, pyver): - return "numpy-%s-py%s-python.org.dmg" % (fullversion, pyver) +def dmg_name(fullversion, pyver, osxver=None): + """Return name for dmg installer. + + Notes + ----- + Python 2.7 has two binaries, one for 10.3 (ppc, i386) and one for 10.6 + (i386, x86_64). All other Python versions at python.org at the moment + have binaries for 10.3 only. The "macosx%s" part of the dmg name should + correspond to the python.org naming scheme. + """ + # assume that for the py2.7/osx10.6 build the deployment target is set + # (should be done in the release script). + if not osxver: + osxver = os.environ.get('MACOSX_DEPLOYMENT_TARGET', '10.3') + return "numpy-%s-py%s-python.org-macosx%s.dmg" % (fullversion, pyver, + osxver) def macosx_version(): if not sys.platform == 'darwin': @@ -580,7 +594,7 @@ def write_release_task(options, filename='NOTES.txt'): def write_log_task(options, filename='Changelog'): st = subprocess.Popen( - ['git', 'svn', 'log', '%s..%s' % (LOG_START, LOG_END)], + ['git', 'log', '%s..%s' % (LOG_START, LOG_END)], stdout=subprocess.PIPE) out = st.communicate()[0] diff --git a/release.sh b/release.sh index bb5a375db985..5f1f31ebbef9 100644 --- a/release.sh +++ b/release.sh @@ -5,6 +5,17 @@ # downloads, i.e. two versions for Python 2.7. The Intel 32/64-bit version is # for OS X 10.6+, the other dmg installers are for 10.3+ and are built on 10.5 +# Check we're using the correct g++/c++ for the 32-bit 2.6 version we build for +# the docs and the 64-bit 2.7 dmg installer. +# We do this because for Python 2.6 we use a symlink on the PATH to select +# /usr/bin/g++-4.0, while for Python 2.7 we need the default 4.2 version. +export PATH=~/Code/tmp/gpp40temp/:$PATH +gpp="$(g++ --version | grep "4.0")" +if [ -z "$gpp" ]; then + echo "Wrong g++ version, we need 4.0 to compile scipy with Python 2.6" + exit 1 +fi + # bootstrap needed to ensure we build the docs from the right scipy version paver bootstrap source bootstrap/bin/activate @@ -19,6 +30,14 @@ paver pdf paver sdist export MACOSX_DEPLOYMENT_TARGET=10.6 +# Use GCC 4.2 for 64-bit OS X installer for Python 2.7 +export PATH=~/Code/tmp/gpp42temp/:$PATH +gpp="$(g++ --version | grep "4.2")" +if [ -z "$gpp" ]; then + echo "Wrong g++ version, we need 4.2 for 64-bit binary for Python 2.7" + exit 1 +fi + paver dmg -p 2.7 # 32/64-bit version paver bdist_superpack -p 3.2