Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Using Python 2.4 on a 2.6 system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Sun Jan 24, 2010 6:06 pm    Post subject: Using Python 2.4 on a 2.6 system Reply with quote

I have python-2.6 in my system. If I need python-2.4, which I was able to emerge (2.4.6, to be exact), how do I get an ebuild to use it instead of 2.6? I'm trying to emerge something that fails because "python 2.4 is needed".
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Sun Jan 24, 2010 6:44 pm    Post subject: Reply with quote

audiodef,

You make a particular version of python active by using
Code:
eselect python

There is also pyton updater, which rebuild things against the currently selected python.

You should fix the ebuild rather than provide an old python
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6051
Location: Removed by Neddy

PostPosted: Sun Jan 24, 2010 7:30 pm    Post subject: Reply with quote

by ebuild depending on python.2 4 I take it what you mean is there is a python app that only works for python-2.4?

if that is the case there are a couple of ebuild variables you can make use of

SUPPORT_PYTHON_ABIS
RESTRICT_PYTHON_ABIS

This influence /usr/bin/python (this is actually a C-program which will then execute /usr/bin/python-2.{4,5...}

have a look at zope or plone ebuilds
both zope and plone are py-2.4 only
_________________
Quote:
Removed by Chiitoo
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Sun Jan 24, 2010 10:09 pm    Post subject: Reply with quote

Thanks, guys. I don't think there's anything to fix in the ebuild, as the source code itself is telling me it wants python 2.4 - not the ebuild. Is there any way around that? It's a program that hasn't been updated since 2006, I think, and I'm not looking to maintain it myself - just write an ebuild so other people can install it from an overlay.

Using eselect to switch to python 2.4.6, a manual make still fails, so maybe that's that.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6051
Location: Removed by Neddy

PostPosted: Sun Jan 24, 2010 11:18 pm    Post subject: Reply with quote

audiodef wrote:
Thanks, guys. I don't think there's anything to fix in the ebuild, as the source code itself is telling me it wants python 2.4 - not the ebuild. Is there any way around that? It's a program that hasn't been updated since 2006, I think, and I'm not looking to maintain it myself - just write an ebuild so other people can install it from an overlay.

Using eselect to switch to python 2.4.6, a manual make still fails, so maybe that's that.


please read my post again
_________________
Quote:
Removed by Chiitoo
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Sun Jan 24, 2010 11:29 pm    Post subject: Reply with quote

I'm looking in the zope dir of portage and there are quite a few things in there. The few ebuilds I looked at did not have those variables. Could you point me to a couple of specific ebuilds, including version, that contain these vars?

EDIT: Found it in a zodb ebuild. Trying it out now. Is there a guide somewhere on the use of these vars? I'd like to know things like whether I should use EAPI="2", etc., or anything else that may be relevant.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Mon Jan 25, 2010 3:30 pm    Post subject: Reply with quote

I tried SUPPORT_PYTHON_ABIS="1" and the compile still fails because python-2.4 is needed. Here's the ebuild:

Code:

# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /cvsroot/jacklab/gentoo/media-sound/mjoo/mjoo-9999.ebuild,v 1.1 2006/04/10 18:08:30 gimpel Exp $

#inherit subversion virtualx2
EAPI="2"
SUPPORT_PTYHON_ABIS="1"

DESCRIPTION="mjoo is a live sequencer with ZUI interface using jack"
HOMEPAGE="http://mjoo.org"
SRC_URI="http://downloads.sourceforge.net/project/muframework/mjoo/mjoo-0.0.5/${P}.tar.gz"

#ESVN_REPO_URI="http://svn.zeitherrschaft.org/mjoo/trunk"
#S="${WORKDIR}/trunk"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE="dssi ladspa"

DEPEND="${RDEPEND}
                >=media-sound/jack-audio-connection-kit-0.100
                >=x11-libs/gtk+-2.8
                dev-python/twisted
                dev-python/pygtk
                dev-python/pyopengl
                >=dev-python/ctypes-0.9.6
                dev-python/pygtkglext
                dssi? ( media-libs/dssi )
                ladspa? ( >=media-libs/ladspa-sdk-1.12 )"
RDEPEND=">=dev-lang/python-2.4
                virtual/opengl"

pkg_setup() {
                # ugly temporary hack to make SConstruct happy
                mkdir -p /opt/mjoo
}

src_compile() {
                emake || die "make failed"
}

src_install() {
                # now lets cause a funky sandbox violation
                # make DESTDIR=${D}/opt/mjoo install || die "installation failed"
                # any idea on this one ^^?
                # dosym /opt/mjoo/mjoo /usr/bin/mjoo  # also fails

                # the above sucks, so lets install things manually
                insinto /opt/${PN}
                doins *.py *.glade *.so ${PN}
                fperms 755 /opt/mjoo/mjoo
}

pkg_postinst() {
        einfo ""
        einfo "You can now start mjoo with the command:"
        einfo ""
        einfo "/opt/mjoo/mjoo"
        einfo ""
}


Did I do anything wrong, or will this simply not compile?
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Mon Jan 25, 2010 4:20 pm    Post subject: Reply with quote

Shouldn't it be RDEPEND="=dev-lang/python-2.4*" ?
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Mon Jan 25, 2010 8:31 pm    Post subject: Reply with quote

Thanks, Mike. While that fix made sure python-2.4* gets pulled in, it continues to fail with the same error.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum