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