Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6a1f483

Browse files
committed
Put windows build cmds in a reusable location so we can upload .exes to PyPI.
1 parent 1f44f06 commit 6a1f483

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

tools/build_release

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,8 @@ sh('./setup.py sdist --formats=gztar,zip')
2828
# Build eggs
2929
sh('python ./setupegg.py bdist_egg')
3030

31-
# Call the windows build separately, so that the extra Windows scripts don't
32-
# get pulled into Unix builds (setup.py has code which checks for
33-
# bdist_wininst). Note that the install scripts args are added to the main
34-
# distutils call in setup.py, so they don't need to be passed here.
35-
sh("python setup.py bdist_wininst")
36-
37-
# The Windows 64-bit installer can't be built by a Linux/Mac Python because ofa
38-
# bug in distutils: http://bugs.python.org/issue6792.
39-
# So we have to build it with a wine-installed native Windows Python...
40-
sh("%s/.wine/dosdevices/c\:/Python27/python.exe setup.py build "
41-
"--plat-name=win-amd64 bdist_wininst "
42-
"--install-script=ipython_win_post_install.py" % os.environ['HOME'])
31+
# Run windows builds
32+
map(sh, win_builds)
4333

4434
# Change name so retarded Vista runs the installer correctly
4535
sh("rename 's/linux-i686/win32/' dist/*.exe")

tools/release

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ sh('./setup.py register')
5050

5151
# Upload all files
5252
sh('./setup.py sdist --formats=gztar,zip upload')
53+
for wb in win_builds:
54+
sh(wb + ' upload')
5355
cd(distdir)
5456
print( 'Uploading distribution files...')
5557

tools/toollib.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@
1919
archive_dir = 'archive.ipython.org'
2020
archive = '%s:%s' % (archive_user, archive_dir)
2121

22+
# Commands for Windows builds.
23+
# We do them separately, so that the extra Windows scripts don't get pulled
24+
# into Unix builds (setup.py has code which checks for bdist_wininst). Note
25+
# that the install scripts args are added to the main distutils call in
26+
# setup.py, so they don't need to be passed here.
27+
#
28+
# The Windows 64-bit installer can't be built by a Linux/Mac Python because ofa
29+
# bug in distutils: http://bugs.python.org/issue6792.
30+
# So we have to build it with a wine-installed native Windows Python...
31+
win_builds = ["python setup.py bdist_wininst",
32+
r"%s/.wine/dosdevices/c\:/Python27/python.exe setup.py build "
33+
"--plat-name=win-amd64 bdist_wininst "
34+
"--install-script=ipython_win_post_install.py" %
35+
os.environ['HOME'] ]
36+
2237
# Utility functions
2338
def sh(cmd):
2439
"""Run system command in shell, raise SystemExit if it returns an error."""

0 commit comments

Comments
 (0)