mirror of
https://github.com/python/cpython.git
synced 2025-10-13 10:23:28 +00:00
Issue #8202: Set sys.argv[0] to -m rather than -c while searching for the module to execute. Also updates all the cmd_line_script tests to validate the setting of sys.path[0] and the current working directory
This commit is contained in:
parent
46e6380563
commit
d26c18adcc
8 changed files with 130 additions and 53 deletions
|
@ -86,9 +86,9 @@ def make_zip_script(zip_dir, zip_basename, script_name, name_in_zip=None):
|
|||
# zip_file.close()
|
||||
return zip_name, os.path.join(zip_name, name_in_zip)
|
||||
|
||||
def make_pkg(pkg_dir):
|
||||
def make_pkg(pkg_dir, init_source=''):
|
||||
os.mkdir(pkg_dir)
|
||||
make_script(pkg_dir, '__init__', '')
|
||||
make_script(pkg_dir, '__init__', init_source)
|
||||
|
||||
def make_zip_pkg(zip_dir, zip_basename, pkg_name, script_basename,
|
||||
source, depth=1, compiled=False):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue