New submission from Alexander P:

For example, Jython 2.7. When we try to execute `jython-standalone -m pip`, 
distutils.sysconfig tries to parse sys.executable as a path and obviously fails:

    Traceback (most recent call last):
      File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/runpy.py", line 
161, in _run_module_as_main
      File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/runpy.py", line 
72, in _run_code
      File 
"/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/ensurepip/__main__.py", 
line 4, in <module>
      File 
"/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/ensurepip/__init__.py", 
line 220, in _main
      File 
"/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/ensurepip/__init__.py", 
line 123, in bootstrap
      File 
"/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/ensurepip/__init__.py", 
line 45, in _run_pip
      File "/tmp/tmp9QnVEm/pip-1.6-py2.py3-none-any.whl/pip/__init__.py", line 
10, in <module>
      File "/tmp/tmp9QnVEm/pip-1.6-py2.py3-none-any.whl/pip/util.py", line 13, 
in <module>
      File 
"/tmp/tmp9QnVEm/pip-1.6-py2.py3-none-any.whl/pip/backwardcompat/__init__.py", 
line 115, in <module>
      File 
"/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/distutils/sysconfig.py", 
line 28, in <module>
      File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/posixpath.py", 
line 367, in realpath
      File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/posixpath.py", 
line 373, in _joinrealpath
      File "/home/ale/dev/3toj/jython-standalone-2.7.0.jar/Lib/posixpath.py", 
line 61, in isabs
    AttributeError: 'NoneType' object has no attribute 'startswith'

----------
components: Distutils
messages: 279633
nosy: dstufft, eric.araujo, iamale
priority: normal
severity: normal
status: open
title: Distutils fail if sys.executable is None
type: behavior

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28552>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to