##// END OF EJS Templates
fix building
Matthias Bussonnier -
Show More
@@ -1,48 +1,47 b''
1 1 include README.rst
2 2 include COPYING.rst
3 3 include LICENSE
4 4 include setupbase.py
5 include setupegg.py
6 5 include MANIFEST.in
7 6 include pytest.ini
8 7 include mypy.ini
9 8 include .mailmap
10 9 include .flake8
11 10 include .pre-commit-config.yaml
12 11
13 12 recursive-exclude tools *
14 13 exclude tools
15 14 exclude CONTRIBUTING.md
16 15 exclude .editorconfig
17 16
18 17 graft setupext
19 18
20 19 graft scripts
21 20
22 21 # Load main dir but exclude things we don't want in the distro
23 22 graft IPython
24 23
25 24 # Documentation
26 25 graft docs
27 26 exclude docs/\#*
28 27 exclude docs/man/*.1.gz
29 28
30 29 exclude .git-blame-ignore-revs
31 30
32 31 # Examples
33 32 graft examples
34 33
35 34 # docs subdirs we want to skip
36 35 prune docs/build
37 36 prune docs/gh-pages
38 37 prune docs/dist
39 38
40 39 # Patterns to exclude from any directory
41 40 global-exclude *~
42 41 global-exclude *.flc
43 42 global-exclude *.yml
44 43 global-exclude *.pyc
45 44 global-exclude *.pyo
46 45 global-exclude .dircopy.log
47 46 global-exclude .git
48 47 global-exclude .ipynb_checkpoints
@@ -1,50 +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 = './setup.py sdist --formats=gztar'
21 sdists = "{python} setup.py sdist --formats=xztar".format(python=sys.executable)
22 22 # Binary dists
23 23 def buildwheels():
24 sh('{python} setupegg.py bdist_wheel'.format(python=sys.executable))
24 sh("{python} setup.py bdist_wheel".format(python=sys.executable))
25
25 26
26 27 # Utility functions
27 28 def sh(cmd):
28 29 """Run system command in shell, raise SystemExit if it returns an error."""
29 30 print("$", cmd)
30 31 stat = os.system(cmd)
31 32 #stat = 0 # Uncomment this and comment previous to run in debug mode
32 33 if stat:
33 34 raise SystemExit("Command %s failed with code: %s" % (cmd, stat))
34 35
35 36 def get_ipdir():
36 37 """Get IPython directory from command line, or assume it's the one above."""
37 38
38 39 # Initialize arguments and check location
39 40 ipdir = pjoin(os.path.dirname(__file__), os.pardir)
40 41
41 42 ipdir = os.path.abspath(ipdir)
42 43
43 44 cd(ipdir)
44 45 if not os.path.isdir('IPython') and os.path.isfile('setup.py'):
45 46 raise SystemExit('Invalid ipython directory: %s' % ipdir)
46 47 return ipdir
47 48
48 49 def execfile(fname, globs, locs=None):
49 50 locs = locs or globs
50 51 exec(compile(open(fname).read(), fname, "exec"), globs, locs)
General Comments 0
You need to be logged in to leave comments. Login now