Mercurial > hg
comparison contrib/packaging/hg-docker @ 41233:92b3811fd15f
hg-docker: fix Python 3.4 compatibility (for CentOS 7)
I realize Mercurial is not targetting Python 3.4 compatibility,
but without this change, it's not even possible to build it on
CentOS 7 (and I assume the same is true for RHEL 7).
Differential Revision: https://phab.mercurial-scm.org/D5570
author | Mathias De Mare <mathias.de_mare@nokia.com> |
---|---|
date | Fri, 11 Jan 2019 13:14:25 +0100 |
parents | e5916f1236f3 |
children | 4c0d4bbdc395 |
comparison
equal
deleted
inserted
replaced
41232:f3f5bfbf7e04 | 41233:92b3811fd15f |
---|---|
70 '--tag', tag, | 70 '--tag', tag, |
71 '-', | 71 '-', |
72 ] | 72 ] |
73 | 73 |
74 print('executing: %r' % args) | 74 print('executing: %r' % args) |
75 subprocess.run(args, input=dockerfile, check=True) | 75 p = subprocess.Popen(args, stdin=subprocess.PIPE) |
76 p.communicate(input=dockerfile) | |
77 if p.returncode: | |
78 raise subprocess.CalledProcessException( | |
79 p.returncode, 'failed to build docker image: %s %s' \ | |
80 % (p.stdout, p.stderr)) | |
76 | 81 |
77 def command_build(args): | 82 def command_build(args): |
78 build_args = [] | 83 build_args = [] |
79 for arg in args.build_arg: | 84 for arg in args.build_arg: |
80 k, v = arg.split('=', 1) | 85 k, v = arg.split('=', 1) |