##// END OF EJS Templates
Merge pull request #10241 from takluyver/release-integrate-twine...
Matthias Bussonnier -
r23304:a1a338f2 merge
parent child Browse files
Show More
@@ -168,17 +168,11 b' Get a fresh clone of the tag for building the release::'
168
168
169 .. note::
169 .. note::
170
170
171 You can aslo cleanup the current working repository with ``git clean -xfdi``
171 You can also cleanup the current working repository with ``git clean -xfdi``
172
172
173 8. Run the release script
173 8. Run the release script
174 -------------------------
174 -------------------------
175
175
176 .. important::
177
178 These steps cover instructions for creating releases of IPython 5.x LTS and
179 IPython 6.x. Ignore release steps for Python 2 when releasing IPython 6.x
180 which no longer supports Python 2.
181
182 Run the ``release`` script, this step requires having a current wheel, Python
176 Run the ``release`` script, this step requires having a current wheel, Python
183 >=3.4 and Python 2.7.::
177 >=3.4 and Python 2.7.::
184
178
@@ -194,14 +188,7 b' Use the following to actually upload the result of the build::'
194
188
195 ./tools/release upload
189 ./tools/release upload
196
190
197 It should posts them to ``archive.ipython.org``.
191 It should posts them to ``archive.ipython.org`` and to PyPI.
198
199 You will need to use `twine <https://github.com/pypa/twine>`_ ) manually to
200 actually upload on PyPI. Unlike setuptools, twine is able to upload packages
201 over SSL::
202
203 twine upload dist/*
204
205
192
206 PyPI/Warehouse will automatically hide previous releases. If you are uploading
193 PyPI/Warehouse will automatically hide previous releases. If you are uploading
207 a non-stable version, make sure to log-in to PyPI and un-hide previous version.
194 a non-stable version, make sure to log-in to PyPI and un-hide previous version.
@@ -6,6 +6,7 b' This should ONLY be run at real release time.'
6 from __future__ import print_function
6 from __future__ import print_function
7
7
8 import os
8 import os
9 from subprocess import call
9 import sys
10 import sys
10
11
11 from toollib import (get_ipdir, pjoin, cd, execfile, sh, archive,
12 from toollib import (get_ipdir, pjoin, cd, execfile, sh, archive,
@@ -48,7 +49,7 b' cd(tooldir)'
48
49
49 if 'upload' in sys.argv:
50 if 'upload' in sys.argv:
50 cd(distdir)
51 cd(distdir)
51 print( 'Uploading distribution files to GitHub...')
52 #print( 'Uploading distribution files to GitHub...')
52
53
53 for fname in os.listdir('.'):
54 for fname in os.listdir('.'):
54 # TODO: update to GitHub releases API
55 # TODO: update to GitHub releases API
@@ -58,31 +59,35 b" if 'upload' in sys.argv:"
58 post_download("ipython/ipython", fname, description=desc)
59 post_download("ipython/ipython", fname, description=desc)
59
60
60 # Make target dir if it doesn't exist
61 # Make target dir if it doesn't exist
61 print('Uploading IPython to backup site.')
62 print('1. Uploading IPython to archive.ipython.org')
62 sh('ssh %s "mkdir -p %s/release/%s" ' % (archive_user, archive_dir, version))
63 sh('ssh %s "mkdir -p %s/release/%s" ' % (archive_user, archive_dir, version))
63 sh('scp * %s' % release_site)
64 sh('scp * %s' % release_site)
64
65
65 print( 'Uploading backup files...')
66 print('2. Uploading backup files...')
66 cd(ipbackupdir)
67 cd(ipbackupdir)
67 sh('scp `ls -1tr *tgz | tail -1` %s' % backup_site)
68 sh('scp `ls -1tr *tgz | tail -1` %s' % backup_site)
68
69
69 print('Done!')
70 print('3. Uploading to PyPI using twine')
70 print('Use `twine upload dist/*` to upload the files to PyPI')
71 cd(distdir)
72 call(['twine', 'upload'] + os.listdir('.'))
73
71 else:
74 else:
75 # Build, but don't upload
76
77 # Make backup tarball
72 sh('./make_tarball.py')
78 sh('./make_tarball.py')
73 sh('mv ipython-*.tgz %s' % ipbackupdir)
79 sh('mv ipython-*.tgz %s' % ipbackupdir)
74
80
75 # Build release files
81 # Build release files
76 sh('./build_release %s' % ipdir)
82 sh('./build_release %s' % ipdir)
77
83
78 # Not Registering with PyPI, registering with setup.py is insecure as communication is not encrypted
79 cd(ipdir)
84 cd(ipdir)
80
85
81 # Upload all files
86 # Upload all files
82 sh(sdists)
87 sh(sdists)
83
88
84 buildwheels()
89 buildwheels()
85 print("`./release upload` to upload source distribution on github and ipython archive")
90 print("`./release upload` to upload source distribution on PyPI and ipython archive")
86 sys.exit(0)
91 sys.exit(0)
87
92
88
93
General Comments 0
You need to be logged in to leave comments. Login now