Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 421311 - dev-python/pypy should offer to build with itself, if possible
Summary: dev-python/pypy should offer to build with itself, if possible
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal enhancement with 1 vote (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-16 05:31 UTC by Ben Longbons
Modified: 2013-01-13 17:46 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Longbons 2012-06-16 05:31:46 UTC
dev-python/pypy is famous for having ridiculously long compile times. On my system (amd64 with 2G RAM) it took 6.5 days ... and then the next week the next version gets released.

It would very be nice if there was some sort of option to build with itself. Obviously, you'd want to have some way of disabling it in case you had a broken pypy, but it would be sane to prefer it by default, perhaps with an automated test.
Comment 1 Ben Longbons 2012-07-06 05:14:13 UTC
On further exploration, pypy 1.9 took longer to build on pypy 1.8, than pypy 1.8 took to build on cpython.

On the other hand, pypy 1.9 built in less than a day when I upgraded to 3GB RAM on amd64.
Comment 2 Marien Zwart (RETIRED) gentoo-dev 2012-07-06 12:01:05 UTC
You really, really, really need more RAM. See http://pypy.org/download.html#building-from-source . There are some tweaks that can be made there, but I believe we should look into providing a prebuilt binary for people who do not have 4G (or preferably more) of RAM. Build time if the translation process fits into memory is something like 1 or 2 hours, it gets a *lot* longer if it starts thrashing, like it does on your 2G or 3G system.
Comment 3 ivan+gentoo 2012-08-27 00:06:43 UTC
The last time I checked, PyPy translated twice as fast when using PyPy instead of CPython. (Assuming enough RAM)
Comment 4 Forza 2012-12-01 10:45:23 UTC
Yes, PyPy compiling itself on systems with >=4GiB ram is at least twice as fast than with CPython. 

The ebuild should check if PyPy is installed and prefer it in favour of CPython (perhaps with USE-flag)
Comment 5 Mike Gilbert gentoo-dev 2012-12-20 05:51:56 UTC
With the latest pypy ebuilds, you can build pypy using pypy by setting EPYTHON in a package.env configuration.

For example:

mkdir -p /etc/portage/env
echo EPYTHON=pypy-c1.9 >> /etc/portage/env/pypy.conf
echo dev-python/pypy pypy.conf >> /etc/portage/package.env

I think it might still be preferable to have the ebuild automatically prefer pypy, but this is an easy workaround.