Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d9ca8ba

Browse files
committed
setupext: fix bug in new method of Tcl/Tk discovery
Force use of /bin/sh in Popen, and use corresponding shell commands; "source" is a C-shell command, not available in /bin/sh.
1 parent 0906cb1 commit d9ca8ba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

setupext.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -932,8 +932,10 @@ def parse_tcl_config(tcl_lib_dir, tk_lib_dir):
932932

933933
def get_var(file, varname):
934934
p = subprocess.Popen(
935-
'source %s ; eval echo ${%s}' % (file, varname),
936-
shell=True, stdout=subprocess.PIPE)
935+
'. %s ; eval echo ${%s}' % (file, varname),
936+
shell=True,
937+
executable="/bin/sh",
938+
stdout=subprocess.PIPE)
937939
result = p.communicate()[0]
938940
return result
939941

0 commit comments

Comments
 (0)