Show More
@@ -23,10 +23,11 b' except ImportError:' | |||||
23 |
|
23 | |||
24 | github = '--github' in sys.argv |
|
24 | github = '--github' in sys.argv | |
25 |
|
25 | |||
26 |
cmd_t = "{py} setup.py bdist_wininst --plat-name= |
|
26 | cmd_t = "{py} setup.py bdist_wininst --plat-name={plat}" | |
27 |
|
27 | |||
28 | if '--pypi' in sys.argv: |
|
28 | if '--pypi' in sys.argv: | |
29 | cmd_t += ' --upload' |
|
29 | raise NotImplementedError("pypi upload doesn't work yet") | |
|
30 | cmd_t += ' upload' | |||
30 |
|
31 | |||
31 | for py in ['python', 'python3']: |
|
32 | for py in ['python', 'python3']: | |
32 | # deliberately mangle the name, |
|
33 | # deliberately mangle the name, | |
@@ -36,11 +37,15 b" for py in ['python', 'python3']:" | |||||
36 | shutil.rmtree('build') |
|
37 | shutil.rmtree('build') | |
37 | except OSError: |
|
38 | except OSError: | |
38 | pass |
|
39 | pass | |
39 |
for plat in [' |
|
40 | for plat in ['win32', 'win-amd64']: | |
40 | cmd = cmd_t.format(**locals()) |
|
41 | cmd = cmd_t.format(**locals()) | |
41 | sh(cmd) |
|
42 | sh(cmd) | |
|
43 | orig = glob.glob(os.path.join('dist', 'ipython-*.{plat}.exe'.format(**locals())))[0] | |||
|
44 | mangled = orig.replace('.{plat}.exe'.format(**locals()), | |||
|
45 | '.py{v}-{plat}.exe'.format(**locals()) | |||
|
46 | ) | |||
|
47 | os.rename(orig, mangled) | |||
42 | if github and gh_api: |
|
48 | if github and gh_api: | |
43 | exe = glob.glob(os.path.join("dist", "ipython-*{v}-{plat}.exe".format(**locals())))[0] |
|
49 | print ("Uploading %s to GitHub" % mangled) | |
44 | print ("Uploading %s to GitHub" % exe) |
|
|||
45 | desc = "IPython Installer for Python {v}.x on {plat}".format(**locals()) |
|
50 | desc = "IPython Installer for Python {v}.x on {plat}".format(**locals()) | |
46 |
gh_api.post_download('ipython/ipython', |
|
51 | gh_api.post_download('ipython/ipython', mangled, description=desc) |
General Comments 0
You need to be logged in to leave comments.
Login now