##// END OF EJS Templates
Do not upload to archive.ipython.org anymore...
M Bussonnier -
Show More
@@ -1,86 +1,10 b''
1 #!/usr/bin/env python3
1 #!/usr/bin/env python3
2 """IPython release script.
2 """IPython release script.
3
3
4 This should ONLY be run at real release time.
4 Deprecated
5 """
6 from __future__ import print_function
7
8 import os
9 from glob import glob
10 from pathlib import Path
11 from subprocess import call
12 import sys
13
14 from toollib import (get_ipdir, cd, execfile, sh, archive,
15 archive_user, archive_dir)
16
17 # Get main ipython dir, this will raise if it doesn't pass some checks
18 ipdir = get_ipdir()
19 tooldir = ipdir / 'tools'
20 distdir = ipdir / 'dist'
21
22 # Where I keep static backups of each release
23 ipbackupdir = Path('~/ipython/backup').expanduser()
24 if not ipbackupdir.exists():
25 ipbackupdir.mkdir(parents=True, exist_ok=True)
26
27 # Start in main IPython dir
28 cd(ipdir)
29
30 # Load release info
31 version = None
32 execfile(Path('IPython','core','release.py'), globals())
33
34 # Build site addresses for file uploads
35 release_site = '%s/release/%s' % (archive, version)
36 backup_site = '%s/backup/' % archive
37
38 # Start actual release process
39 print()
40 print('Releasing IPython')
41 print('=================')
42 print()
43 print('Version:', version)
44 print()
45 print('Source IPython directory:', ipdir)
46 print()
47
48 # Perform local backup, go to tools dir to run it.
49 cd(tooldir)
50
5
51 if 'upload' in sys.argv:
6 """
52 cd(distdir)
7 sys.exit("deprecated")
53
54 # do not upload OS specific files like .DS_Store
55 to_upload = glob('*.whl')+glob('*.tar.gz')
56
57 # Make target dir if it doesn't exist
58 print('1. Uploading IPython to archive.ipython.org')
59 sh('ssh %s "mkdir -p %s/release/%s" ' % (archive_user, archive_dir, version))
60 sh('scp *.tar.gz *.whl %s' % release_site)
61
62 print('2. Uploading backup files...')
63 cd(ipbackupdir)
64 sh('scp `ls -1tr *tgz | tail -1` %s' % backup_site)
65
66 print('3. Uploading to PyPI using twine')
67 cd(distdir)
68 call(['twine', 'upload', '--verbose'] + to_upload)
69
70 else:
71 # Build, but don't upload
72
73 # Make backup tarball
74 sh('python make_tarball.py')
75 sh('mv ipython-*.tgz %s' % ipbackupdir)
76
77 # Build release files
78 sh('./build_release')
79
80 cd(ipdir)
81
82 print("`./release upload` to upload source distribution on PyPI and ipython archive")
83 sys.exit(0)
84
8
85
9
86
10
@@ -231,7 +231,7 b' then'
231 echo
231 echo
232 echo $BLUE"Attempting to build package..."$NOR
232 echo $BLUE"Attempting to build package..."$NOR
233
233
234 tools/release
234 tools/build_release
235
235
236
236
237 echo $RED'$ shasum -a 256 dist/*'
237 echo $RED'$ shasum -a 256 dist/*'
@@ -245,7 +245,7 b' then'
245 echo
245 echo
246 echo $BLUE"Attempting to build package..."$NOR
246 echo $BLUE"Attempting to build package..."$NOR
247
247
248 tools/release
248 tools/build_release
249
249
250 echo $RED"Check the shasum for SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH"
250 echo $RED"Check the shasum for SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH"
251 echo $RED'$ shasum -a 256 dist/*'
251 echo $RED'$ shasum -a 256 dist/*'
@@ -254,6 +254,6 b' then'
254
254
255 if ask_section "upload packages ?"
255 if ask_section "upload packages ?"
256 then
256 then
257 tools/release upload
257 twine upload --verbose dist/*.tar.gz dist/*.whl
258 fi
258 fi
259 fi
259 fi
General Comments 0
You need to be logged in to leave comments. Login now