invariably become out-of-date. If you want to write custom scripts
anyway, note an easy-to-miss point: some modules are written with CFFI,
and require some compilation. If you install PyPy as root without
pre-compiling them, normal users will get permission errors. This means
you need to run for example <ttclass="docutils literal">pypy <spanclass="pre">-c</span>“import gdbm”</tt> during the
installation process (see the exact list in <aclass="reference external"href="https://bitbucket.org/pypy/pypy/src/default/pypy/tool/release/package.py">package.py</a>). Users
seeing a broken installation of PyPy can also fix it after-the-fact, if
they have sudo rights, by running <ttclass="docutils literal">sudo pypy <spanclass="pre">-c</span>“import gdbm”</tt>.</p>
pre-compiling them, normal users will get errors:</p>
<ulclass="simple">
<li>PyPy 2.5.1 or earlier: normal users would see permission errors.
Installers need to run <ttclass="docutils literal">pypy <spanclass="pre">-c</span>“import gdbm”</tt> and other similar
commands at install time; the exact list is in <aclass="reference external"href="https://bitbucket.org/pypy/pypy/src/default/pypy/tool/release/package.py">package.py</a>. Users
seeing a broken installation of PyPy can fix it after-the-fact if they
have sudo rights, by running once e.g. <ttclass="docutils literal">sudo pypy <spanclass="pre">-c</span>"import gdbm</tt>.</li>
<li>PyPy 2.6 and later: anyone would get <ttclass="docutils literal">ImportError: no module named
_gdbm_cffi</tt>. Installers need to run <ttclass="docutils literal">pypy _gdbm_build.py</tt> in the
<ttclass="docutils literal">lib_pypy</tt> directory during the installation process (plus others;
see the exact list in <aclass="reference external"href="https://bitbucket.org/pypy/pypy/src/default/pypy/tool/release/package.py">package.py</a>). Users seeing a broken
installation of PyPy can fix it after-the-fact, by running <ttclass="docutils literal">pypy
/path/to/lib_pypy/_gdbm_build.py</tt>. This command produces a file
called <ttclass="docutils literal"><spanclass="pre">_gdbm_cffi.pypy-26.so</span></tt> locally, which is a C extension
module for PyPy. You can move it at any place where modules are
normally found: e.g. in your project's main directory, or in a
directory that you add to the env var <ttclass="docutils literal">PYTHONPATH</tt>.</li>