Issue2139

classification
Title: Import mechanism does not import from wheels.
Type: Severity: normal
Components: Versions: Jython 2.7, Jython 2.5
Milestone:
process
Status: closed Resolution: invalid
Dependencies: Superseder:
Assigned To: Nosy List: t-8ch, zyasoft
Priority: Keywords:

Created on 2014-05-10.10:16:29 by t-8ch, last changed 2014-05-10.15:08:04 by zyasoft.

Messages
msg8371 (view) Author: Thomas Weißschuh (t-8ch) Date: 2014-05-10.10:16:29
When putting a wheel (zipfile on the PYTHONPATH) the import mechanism does not pick it up (this breaks for example virtualenv).

# This works with CPython (tested 2.5 - 3.4) and PyPy (1.9 and 2.0) given I use PYTHONPATH=/tmp/requests-2.2.1-py2.py3-none-any.whl
requests = __import__('requests')
print(requests.__file__)
print(requests.__loader__)

# This also works on Jython (and all the others), so zipimport can't be to broken)
import zipimport
ARCHIVE = 'requests-2.2.1-py2.py3-none-any.whl'
requests = zipimport.zipimporter(ARCHIVE).load_module('requests')

print(requests.__file__)
print(requests.__loader__)


Tested with 2.5.3 and 01460e803ef3
msg8372 (view) Author: Thomas Weißschuh (t-8ch) Date: 2014-05-10.11:56:48
Sorry for the noise. The problem is that jython does not honor PYTHONPATH (instead it uses JYTHONPATH). This still breaks virtualenv.
msg8375 (view) Author: Jim Baker (zyasoft) Date: 2014-05-10.15:08:03
No worries, I have also noticed that virtualenv wants to use PYTHONPATH, not JYTHONPATH. However, virtualenv also wants to use the standard pip iirc, so it's one more thing that would have to be temporarily forked.

For the moment, you can install my fork of pip at https://github.com/jimbaker/pip I have verified that you can then use it to install the wheel packaging of requests.

Lastly, we are not going to be supporting wheel on 2.5.

Closing this bug accordingly.
History
Date User Action Args
2014-05-10 15:08:04zyasoftsetstatus: open -> closed
resolution: invalid
messages: + msg8375
nosy: + zyasoft
2014-05-10 11:56:48t-8chsetmessages: + msg8372
components: - Core
2014-05-10 10:16:29t-8chcreate