Skip to content

Commit

Permalink
Merge pull request #6279 from minrk/release-tweaks
Browse files Browse the repository at this point in the history
minor updates to release scripts
  • Loading branch information
takluyver committed Aug 6, 2014
2 parents 8987751 + c18b583 commit 3d09832
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 112 deletions.
24 changes: 1 addition & 23 deletions tools/build_release
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@ import os

from toollib import *

# The windows builds are fairly painful to set up on a posix system via wine,
# so by default we've disabled them and we just build the windows installers
# separately in a true Windows VM.
do_windows = False

# Egg building is also disabled by default. They serve no real purpose in
# python2, and getting a setupegg.py file that has valid python2/3 syntax is a
# pain in the ass. Since the python devs were too stubborn to leave execfile()
# in place in python3, then we just don't build eggs.
do_eggs = False

# Get main ipython dir, this will raise if it doesn't pass some checks
ipdir = get_ipdir()
cd(ipdir)
Expand All @@ -35,15 +24,4 @@ for d in ['build', 'dist', pjoin('docs', 'build'), pjoin('docs', 'dist'),

# Build source and binary distros
sh(sdists)

# Build eggs
if do_eggs:
sh(eggs)

if do_windows:
map(sh, win_builds)
# Change name so retarded Vista runs the installer correctly
sh("rename 's/linux-i686/win32/' dist/*.exe")
sh("rename 's/linux-x86_64/win32/' dist/*.exe")
# exe files aren't really executable under *nix.
sh("chmod -x dist/*.exe")
sh(wheels)
6 changes: 3 additions & 3 deletions tools/github_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ def report(issues, show_urls=False):
if show_urls:
for i in issues:
role = 'ghpull' if 'merged_at' in i else 'ghissue'
print('* :%s:`%d`: %s' % (role, i['number'],
i['title'].replace('`', '``').encode('utf-8')))
print(u'* :%s:`%d`: %s' % (role, i['number'],
i['title'].replace(u'`', u'``')))
else:
for i in issues:
print('* %d: %s' % (i['number'], i['title'].replace('`', '``').encode('utf-8')))
print(u'* %d: %s' % (i['number'], i['title'].replace(u'`', u'``')))

#-----------------------------------------------------------------------------
# Main script
Expand Down
6 changes: 4 additions & 2 deletions tools/release
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ distdir = pjoin(ipdir, 'dist')

# Where I keep static backups of each release
ipbackupdir = os.path.expanduser('~/ipython/backup')
if not os.path.exists(ipbackupdir):
os.makedirs(ipbackupdir)

# Start in main IPython dir
cd(ipdir)
Expand Down Expand Up @@ -53,14 +55,14 @@ sh('./setup.py register')

# Upload all files
sh(sdists + ' upload')
for py in ('2.7', '3.3'):
for py in ('2.7', '3.4'):
sh('python%s setupegg.py bdist_wheel' % py)

cd(distdir)
print( 'Uploading distribution files...')

for fname in os.listdir('.'):
# GitHub doesn't have an API for uploads at the moment
# TODO: update to GitHub releases API
continue
print('uploading %s to GitHub' % fname)
desc = "IPython %s source distribution" % version
Expand Down
66 changes: 0 additions & 66 deletions tools/release_windows.py

This file was deleted.

20 changes: 2 additions & 18 deletions tools/toollib.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,8 @@
# Build commands
# Source dists
sdists = './setup.py sdist --formats=gztar,zip'
# Eggs
eggs = './setupegg.py bdist_egg'

# Windows builds.
# We do them separately, so that the extra Windows scripts don't get pulled
# into Unix builds (setup.py has code which checks for bdist_wininst). Note
# that the install scripts args are added to the main distutils call in
# setup.py, so they don't need to be passed here.
#
# The Windows 64-bit installer can't be built by a Linux/Mac Python because ofa
# bug in distutils: http://bugs.python.org/issue6792.
# So we have to build it with a wine-installed native Windows Python...
win_builds = ["python setup.py bdist_wininst "
"--install-script=ipython_win_post_install.py",
r"%s/.wine/dosdevices/c\:/Python32/python.exe setup.py build "
"--plat-name=win-amd64 bdist_wininst "
"--install-script=ipython_win_post_install.py" %
os.environ['HOME'] ]
# Binary dists
wheels = './setupegg.py bdist_wheel'

# Utility functions
def sh(cmd):
Expand Down

0 comments on commit 3d09832

Please sign in to comment.