• Kirill Smelkov's avatar
    gpython: Fix pymain to properly setup sys.path (take 2) · fb98e594
    Kirill Smelkov authored
    This continues 6b4990f6 (gpython: Fix pymain to properly setup
    sys.path[0]) - now we add test and verify that gpython actually sets
    sys.path in the same way as underlying python does:
    
    - don't add directory of gpython to sys.path
    - for `gpython file` add to sys.path[0] realpath(dir(file)) instead of
      dir(file)  (see PySys_SetArgvEx for the reference, and else - if we do
      not make this change - added test breaks)
    - for `gpython -m mod` add to sys.path[0] realpath('') instead of ''.
      This exactly matches PY3 behaviour, while PY2 behaviour is to add ''
      However PY3 behaviour
    
        * is more sane, and
        * fixes test_defer_excchain_traceback on py27-gevent
    
      -> so we stick to it.
    
    Now all tests pass again.
    fb98e594
Name
Last commit
Last update
3rdparty/include/linux Loading commit data...
golang Loading commit data...
gpython Loading commit data...
.gitignore Loading commit data...
CHANGELOG.rst Loading commit data...
COPYING Loading commit data...
MANIFEST.in Loading commit data...
README.rst Loading commit data...
pyproject.toml Loading commit data...
setup.py Loading commit data...
tox.ini Loading commit data...
trun Loading commit data...