Project:Python/pypy-bin

From Gentoo Wiki
Jump to: navigation, search

dev-python/pypy-bin is the PyPy distribution package for users that can't build PyPy themselves. The build is done by Gentoo developers with a few combinations of USE flags.

Building packages for pypy-bin

Preparation

To help with building consistent packages, dev-binpkg/pypy ebuild is provided in ::mgorny overlay.

user $layman -a mgorny

If necessary, bump the package to appropriate PyPy version and port the changes from gx86 ebuild.

Afterwards, choose a location for binpackage output, and store it in make.conf:

FILE /etc/portage/make.confSetting binpkg location
PYPY_BINPKG_STORE=/var/tmp/pypy-bin
Note
You usually want to use a separate chroot to build LibreSSL versions.

Building PyPy2

Note
As of 7.2.0, PyPy2 uses CFFI-based SSL modules (like PyPy3).

To build all the amd64 variants, the following script may be used:

FILE /usr/local/bin/build-pypy-amd64Building script for amd64
USE="bzip2 jit ncurses -sandbox" emerge -1v dev-binpkg/pypy
USE="bzip2 -jit ncurses -sandbox" emerge -1v dev-binpkg/pypy

To build all the x86 variants, the following script may be used:

FILE /usr/local/bin/build-pypy-x86Building script for x86
USE="bzip2 jit ncurses -sandbox cpu_flags_x86_sse2" emerge -1v dev-binpkg/pypy
USE="bzip2 -jit ncurses -sandbox cpu_flags_x86_sse2" emerge -1v dev-binpkg/pypy
USE="bzip2 -jit ncurses -sandbox -cpu_flags_x86_sse2" emerge -1v dev-binpkg/pypy

Building PyPy3

To build all the amd64 variants, the following script may be used:

FILE /usr/local/bin/build-pypy-amd64Building script for amd64
USE="bzip2 jit ncurses -sandbox" emerge -1v dev-binpkg/pypy3
USE="bzip2 -jit ncurses -sandbox" emerge -1v dev-binpkg/pypy3

To build all the x86 variants, the following script may be used:

FILE /usr/local/bin/build-pypy-x86Building script for x86
USE="bzip2 jit ncurses -sandbox cpu_flags_x86_sse2" emerge -1v dev-binpkg/pypy3
USE="bzip2 -jit ncurses -sandbox cpu_flags_x86_sse2" emerge -1v dev-binpkg/pypy3
USE="bzip2 -jit ncurses -sandbox -cpu_flags_x86_sse2" emerge -1v dev-binpkg/pypy3

Combined builds

For convenience, to build both PyPy2 and PyPy3 for amd64:

FILE /usr/local/bin/build-pypy-amd64Building script for amd64
USE="bzip2 jit ncurses -sandbox" emerge -1v --jobs dev-binpkg/pypy{,3}
USE="bzip2 -jit ncurses -sandbox" emerge -1v --jobs dev-binpkg/pypy{,3}

For x86:

FILE /usr/local/bin/build-pypy-x86Building script for x86
USE="bzip2 jit ncurses -sandbox cpu_flags_x86_sse2" emerge -1v --jobs dev-binpkg/pypy{,3}
USE="bzip2 -jit ncurses -sandbox cpu_flags_x86_sse2" emerge -1v --jobs dev-binpkg/pypy{,3}
USE="bzip2 -jit ncurses -sandbox -cpu_flags_x86_sse2" emerge -1v --jobs dev-binpkg/pypy{,3}

Shipping

After all builds are done, .tar.xz packages will be placed in your PYPY_BINPKG_STORE. Put them on your devspace and bump dev-python/pypy-bin appropriately.