View previous topic :: View next topic |
Author |
Message |
Galumph Tux's lil' helper
Joined: 15 Jul 2010 Posts: 122 Location: Israel
|
Posted: Thu Mar 14, 2013 5:26 pm Post subject: Use pypy with portage without the pypy package |
|
|
In my recent endeavor to make portage as fast as possible, I found I can run on pypy. Sadly, pypy needs to 2GB or ram to compile, something I don't have, so I installed the pypy binary off their website (eww binaries...). Will enabling the pypy use flag and adding pypy to package.provided still work? I really don't want to mess with portage with knowing what I'm doing won't screw it up. |
|
Back to top |
|
|
eyoung100 Veteran
Joined: 23 Jan 2004 Posts: 1428
|
Posted: Thu Mar 14, 2013 6:34 pm Post subject: |
|
|
I don't think that will work. The emerge script will look at the path where pypy was supposed to be built at... If you put the binary in the compiled location that might work, but once you enable the flag an emerge would pull the package in because it was never compiled... _________________ The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper |
|
Back to top |
|
|
Galumph Tux's lil' helper
Joined: 15 Jul 2010 Posts: 122 Location: Israel
|
Posted: Thu Mar 14, 2013 10:05 pm Post subject: |
|
|
eyoung100 wrote: | I don't think that will work. The emerge script will look at the path where pypy was supposed to be built at... If you put the binary in the compiled location that might work |
I'll take a look at the ebuild and try to understand where to stick the binary. Hopefully it isn't too complicated.
eyoung100 wrote: | once you enable the flag an emerge would pull the package in because it was never compiled... |
That's what package.provided is for. It fools portage into thinking the package is already compiled, thus removing the need to pull it in. I used to stick the vanilla sources in there and manage the kernel sources on my own. |
|
Back to top |
|
|
eyoung100 Veteran
Joined: 23 Jan 2004 Posts: 1428
|
Posted: Thu Mar 14, 2013 10:34 pm Post subject: |
|
|
Quote: | 88 src_install() {
89 local INSDESTTREE=/usr/$(get_libdir)/pypy${SLOT}
90 doins -r include lib_pypy lib-python pypy-c
91 fperms a+x ${INSDESTTREE}/pypy-c
92 dosym ../$(get_libdir)/pypy${SLOT}/pypy-c /usr/bin/pypy-c${SLOT}
93 dodoc README |
_________________ The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper |
|
Back to top |
|
|
Galumph Tux's lil' helper
Joined: 15 Jul 2010 Posts: 122 Location: Israel
|
Posted: Fri Mar 15, 2013 2:16 pm Post subject: |
|
|
Alright I seem to have everything in the right place, the only thing missing now is to show portage that pypy is a valid python interpreter. I believe this is done with python_export in the ebuild. How do I emulate this with bash?
E: portage's ebuild calls python_set_active_version() and tries to set to pypy:2.0 and the dies. That's what I'm trying to fix |
|
Back to top |
|
|
eyoung100 Veteran
Joined: 23 Jan 2004 Posts: 1428
|
|
Back to top |
|
|
Galumph Tux's lil' helper
Joined: 15 Jul 2010 Posts: 122 Location: Israel
|
Posted: Fri Mar 15, 2013 2:40 pm Post subject: |
|
|
nope:
Code: | # eselect python list
Available Python interpreters:
[1] python2.7
[2] python3.2 * |
|
|
Back to top |
|
|
eyoung100 Veteran
Joined: 23 Jan 2004 Posts: 1428
|
|
Back to top |
|
|
Galumph Tux's lil' helper
Joined: 15 Jul 2010 Posts: 122 Location: Israel
|
Posted: Fri Mar 15, 2013 3:58 pm Post subject: |
|
|
Nope, nothing. I didn't install pypy through portage, so it doesn't show up in eselect. How do you manually add things to eselect? |
|
Back to top |
|
|
eyoung100 Veteran
Joined: 23 Jan 2004 Posts: 1428
|
|
Back to top |
|
|
Galumph Tux's lil' helper
Joined: 15 Jul 2010 Posts: 122 Location: Israel
|
Posted: Sat Mar 16, 2013 12:20 am Post subject: |
|
|
From the looks of it, eselect uses /usr/share/eselect/modules/python.eselect to set the default python version. The script itself seems to be hardcoded to look for "python?.?" in $PATH or something, which isn't what we're looking for.
Portage has to have a list of all the python interpreters somewhere, it's just matter of finding the list and finding a way to edit it... |
|
Back to top |
|
|
eyoung100 Veteran
Joined: 23 Jan 2004 Posts: 1428
|
Posted: Mon Mar 18, 2013 5:40 pm Post subject: |
|
|
Updating the script will do no good, as the next time the eselect tool is updated during an emerge, it will overwrite your modification _________________ The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper |
|
Back to top |
|
|
|