PyPy support for easy_install

Issue #219 new
created an issue

Distribute and its easy_install do work with PyPy, but the installation is not optimal.

The problem is easy_install treats PyPy 1.5 as CPython 2.7, so it installs the eggs built for CPython 2.7. They work, as they contain the .py files, but the .pyc files in the egg (generated by CPython) are useless for PyPy. Also, the installation won't gain from PyPy module pre-compilation (to PyPy-specific pyc files).

I think what easy_install should do under PyPy is to: * use the CPython 2.7 eggs if available * unzip them * recompile code to get PyPy pyc files

Comments (6)

  1. Jajcus reporter

    PyPy 1.5 is compatible with CPython 2.7.1 at the *.py level, PYC are quite different (and, I guess, platform dependant).

    [jajcus@lolek tmp]$ touch
    [jajcus@lolek tmp]$ python -c 'import mod1'
    [jajcus@lolek tmp]$ pypy -c 'import mod2'
    [jajcus@lolek tmp]$ file mod1.pyc mod2.pyc
    mod1.pyc: python 2.7 byte-compiled
    mod2.pyc: data

    I tried to quickly find something about PyPy PYC files and found only:

    The usual reason for wanting this feature is to distribute non-open-source Python programs by distributing pyc files only, but this use case is not practical for PyPy at the moment because multiple versions of PyPy compiled with various optimizations might be unable to load each other’s pyc files.

    The C extensions are a completely different story, I would not expect them to work with easy_install soon.

  2. Jajcus reporter

    Shouldn't you be using pip anyway?

    Good question. :-) I must admit I didn't know this tool. I'll check it out too. Building from sources should prevent this problem.

    Anyway, as easy_install is still around (and not described as obsolete) it could work better. But it is not something critical.

  3. Anonymous
  4. Log in to comment