From Fedora Project Wiki

I've been experimenting with running yum under PyPy.

This is with pypy-1.9 rpms on an x86_64 Fedora 17 guest

What I had to do

  • build extension modules:
    • bug in distutils/ with more than one option in CFLAGS (need to split on spaces)
      • TODO: add patch to our rpms
      • TODO: send patch upstream
    • rpm: I used rawhide (=f18)'s rpm.rpm, recompiling with pypy as per my python3 patch in
    • yum-metadata-parser (compiled OK)
    • pycurl (compiled OK)
  • I hacked out a call to os.statvfs from yum/ (line 795)
    • TODO: implement it for PyPy

Running it

 sudo pypy /usr/bin/yum YUM-ARGUMENTS

with suitable PYTHONPATH= and LD_LIBRARY_PATH= hacks to deal with my hacked up installation of extension modules

What I've tested so far:

  • yum history (looks sane)
  • yum --assume-no update PACKAGE (looks sane)
  • yum --assume-no remove glibc (looks sane; same output as with CPython, apart from this:
  --- yum-remove-glibc-cpython.out        2012-07-11 11:09:24.641179900 -0400
  +++ yum-remove-glibc-pypy.out   2012-07-11 11:08:37.211797078 -0400
  @@ -1,4 +1,5 @@
  -Loaded plugins: auto-update-debuginfo, langpacks, presto, refresh-packagekit
  +Plugin "refresh-packagekit" can't be imported
  +Loaded plugins: auto-update-debuginfo, langpacks, presto
   Setting up Remove Process
   Resolving Dependencies
   --> Running transaction check

Other Notes