##// END OF EJS Templates
use python -m build
Matthias Bussonnier -
Show More
@@ -1,51 +1,51 b''
1 1 """Various utilities common to IPython release and maintenance tools.
2 2 """
3 3
4 4 # Library imports
5 5 import os
6 6 import sys
7 7
8 8 # Useful shorthands
9 9 pjoin = os.path.join
10 10 cd = os.chdir
11 11
12 12 # Constants
13 13
14 14 # SSH root address of the archive site
15 15 archive_user = 'ipython@archive.ipython.org'
16 16 archive_dir = 'archive.ipython.org'
17 17 archive = '%s:%s' % (archive_user, archive_dir)
18 18
19 19 # Build commands
20 20 # Source dists
21 sdists = "{python} setup.py sdist --formats=gztar".format(python=sys.executable)
21 sdists = "{python} -m build".format(python=sys.executable)
22 22 # Binary dists
23 23 def buildwheels():
24 sh("{python} setup.py bdist_wheel".format(python=sys.executable))
24 sh("{python} -m build".format(python=sys.executable))
25 25
26 26
27 27 # Utility functions
28 28 def sh(cmd):
29 29 """Run system command in shell, raise SystemExit if it returns an error."""
30 30 print("$", cmd)
31 31 stat = os.system(cmd)
32 32 #stat = 0 # Uncomment this and comment previous to run in debug mode
33 33 if stat:
34 34 raise SystemExit("Command %s failed with code: %s" % (cmd, stat))
35 35
36 36 def get_ipdir():
37 37 """Get IPython directory from command line, or assume it's the one above."""
38 38
39 39 # Initialize arguments and check location
40 40 ipdir = pjoin(os.path.dirname(__file__), os.pardir)
41 41
42 42 ipdir = os.path.abspath(ipdir)
43 43
44 44 cd(ipdir)
45 45 if not os.path.isdir('IPython') and os.path.isfile('setup.py'):
46 46 raise SystemExit('Invalid ipython directory: %s' % ipdir)
47 47 return ipdir
48 48
49 49 def execfile(fname, globs, locs=None):
50 50 locs = locs or globs
51 51 exec(compile(open(fname).read(), fname, "exec"), globs, locs)
General Comments 0
You need to be logged in to leave comments. Login now