Show More
@@ -165,7 +165,7 b' Get a fresh clone of the tag for building the release::' | |||||
165 |
|
165 | |||
166 | .. note:: |
|
166 | .. note:: | |
167 |
|
167 | |||
168 |
You can a |
|
168 | You can also cleanup the current working repository with ``git clean -xfdi`` | |
169 |
|
169 | |||
170 | 8. Run the release script |
|
170 | 8. Run the release script | |
171 | ------------------------- |
|
171 | ------------------------- | |
@@ -185,14 +185,7 b' Use the following to actually upload the result of the build::' | |||||
185 |
|
185 | |||
186 | ./tools/release upload |
|
186 | ./tools/release upload | |
187 |
|
187 | |||
188 | It should posts them to ``archive.ipython.org``. |
|
188 | It should posts them to ``archive.ipython.org`` and to PyPI. | |
189 |
|
||||
190 | You will need to use `twine <https://github.com/pypa/twine>`_ ) manually to |
|
|||
191 | actually upload on PyPI. Unlike setuptools, twine is able to upload packages |
|
|||
192 | over SSL. |
|
|||
193 |
|
||||
194 | twine upload dist/* |
|
|||
195 |
|
||||
196 |
|
189 | |||
197 | PyPI/Warehouse will automatically hide previous releases. If you are uploading |
|
190 | PyPI/Warehouse will automatically hide previous releases. If you are uploading | |
198 | a non-stable version, make sure to log-in to PyPI and un-hide previous version. |
|
191 | 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 |
|
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( |
|
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 |
|
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