Help with python from portage

Anything that pertains to Entropy, Equo or Sulfur

Moderator: Moderators

Help with python from portage

Postby mhodak » Fri Aug 19, 2011 2:16

Guys,

I have been very happy with Sabayon, but one issue I have is that I need python with tk flag - I really need to run pymol molecular viewer, which requires the tk USE flag. I want to stay as close to Sabayon as possible, so I followed this guide ( http://wiki.sabayonlinux.org/index.php? ... nd_Portage ) and did the steps suggested including
Code: Select all
layman -S && eix-sync

After this
Code: Select all
eix -C dev-lang python
showed that there was no package matching exactly the python version from Entropy, which had 2.7.2 installed, but only 2.7.2-r2 was available for emerge and even that was masked. I am not sure if that was an issue, but I unmasked 2.7.2-r2 and installed it. After this, I have added both python versions (2.7.2 and 2.7.2-r2) into /etc/entropy/packages/package.mask and ran
Code: Select all
equo rescue spmsync


So far so good, even though I still do not understand why I could not find the same version of python from sabayon in portage for recompile, so maybe I have done something wrong.

Thank you for your help
Now my problem is that in today's update Entropy wants to downgrade python to 2.6.6-r1. What am I doing wrong, how can I avoid this downgrade?
mhodak
Baby Hen
 
Posts: 15
Joined: Thu Aug 18, 2011 23:48

Re: Help with python from portage

Postby Stupot » Fri Aug 19, 2011 4:31

I'm not really sure about this but....

Code: Select all
[email protected] ~ $ equo search dev-lang/python
>>  @@ Searching...
>>      @@ Package: dev-lang/python-2.6.6-r1 branch: 5, [sabayonlinux.org]
>>         Available:     version: 2.6.6-r1 ~ tag: NoTag ~ revision: 0
>>         Installed:     version: 2.6.6-r1 ~ tag: NoTag ~ revision: 0
>>         Slot:          2.6
>>         Homepage:      http://www.python.org/
>>         Description:   Python is an interpreted, interactive,
>>                        object-oriented programming
>>                        language.
>>         License:       PSF-2.2
>>      @@ Package: dev-lang/python-2.7.2 branch: 5, [sabayonlinux.org]
>>         Available:     version: 2.7.2 ~ tag: NoTag ~ revision: 0
>>         Installed:     version: 2.7.2 ~ tag: NoTag ~ revision: 0
>>         Slot:          2.7
>>         Homepage:      http://www.python.org/
>>         Description:   Python is an interpreted, interactive,
>>                        object-oriented programming
>>                        language.
>>         License:       PSF-2.2
>>      @@ Package: dev-lang/python-tk-2.7.2 branch: 5, [sabayonlinux.org]
>>         Available:     version: 2.7.2 ~ tag: NoTag ~ revision: 0
>>         Installed:     version: Not installed ~ tag: N/A ~ revision: N/A
>>         Slot:          2.7
>>         Homepage:      http://www.python.org/
>>         Description:   Tk libraries for Python.
>>         License:       PSF-2.2
>>  Keywords:  dev-lang/python
>>  Found:     3 entries


perhaps you could just install python-tk via entropy?
Stupot
Sagely Hen
 
Posts: 1556
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: Help with python from portage

Postby batvink » Fri Aug 19, 2011 8:01

hi there,
i had the same kind of issue.
my system wanted to switch from branche 6 to branche 5.
Albfneto came with a suggestion to avoid this:
http://forum.sabayon.org/viewtopic.php?f=76&t=24192#p135900
User avatar
batvink
Old Dear Hen
 
Posts: 495
Joined: Sun Oct 28, 2007 11:44
Location: the netherlands

Re: Help with python from portage

Postby mhodak » Fri Aug 19, 2011 9:43

Stupot wrote:I'm not really sure about this but....

Code: Select all
[email protected] ~ $ equo search dev-lang/python
>>  @@ Searching...
>>      @@ Package: dev-lang/python-2.6.6-r1 branch: 5, [sabayonlinux.org]
>>         Available:     version: 2.6.6-r1 ~ tag: NoTag ~ revision: 0
>>         Installed:     version: 2.6.6-r1 ~ tag: NoTag ~ revision: 0
>>         Slot:          2.6
>>         Homepage:      http://www.python.org/
>>         Description:   Python is an interpreted, interactive,
>>                        object-oriented programming
>>                        language.
>>         License:       PSF-2.2
>>      @@ Package: dev-lang/python-2.7.2 branch: 5, [sabayonlinux.org]
>>         Available:     version: 2.7.2 ~ tag: NoTag ~ revision: 0
>>         Installed:     version: 2.7.2 ~ tag: NoTag ~ revision: 0
>>         Slot:          2.7
>>         Homepage:      http://www.python.org/
>>         Description:   Python is an interpreted, interactive,
>>                        object-oriented programming
>>                        language.
>>         License:       PSF-2.2
>>      @@ Package: dev-lang/python-tk-2.7.2 branch: 5, [sabayonlinux.org]
>>         Available:     version: 2.7.2 ~ tag: NoTag ~ revision: 0
>>         Installed:     version: Not installed ~ tag: N/A ~ revision: N/A
>>         Slot:          2.7
>>         Homepage:      http://www.python.org/
>>         Description:   Tk libraries for Python.
>>         License:       PSF-2.2
>>  Keywords:  dev-lang/python
>>  Found:     3 entries


perhaps you could just install python-tk via entropy?

Well I have considered that. The trouble is that the pmw package, which is masked in Sabayon, still requires python with tk USE flag even if python-tk is installed.
mhodak
Baby Hen
 
Posts: 15
Joined: Thu Aug 18, 2011 23:48

Re: Help with python from portage

Postby joost » Fri Aug 19, 2011 9:49

Hold the phone there guys.

We forked a package "python-tk" to be able to actually have packages in our tree that require python +tk enabled.
(since this was requested many times)
So all you need todo is request those packages for Entropy.

We cannot simply enable tk on python directly because it would pull in too much bloat.
joost
Sagely Hen
 
Posts: 2604
Joined: Fri Nov 17, 2006 12:11
Location: The Netherlands

Re: Help with python from portage

Postby mhodak » Fri Aug 19, 2011 10:13

joost wrote:Hold the phone there guys.

We forked a package "python-tk" to be able to actually have packages in our tree that require python +tk enabled.
(since this was requested many times)
So all you need todo is request those packages for Entropy.

We cannot simply enable tk on python directly because it would pull in too much bloat.

Joost, I am aware of the issues Sabayon is having with tk in python and I am also trying to stay as close to possible to pure Sabayon, but I need pymol and pmw, which are masked and Entropy does not see them. I have now installed Sabayon versions of python and python-tk, but I have to use portage to get pymol installed and there I get into trouble, since
the emerge process tries to bring in wrong version of python from portage:
Code: Select all
emerge -av pymol
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  NS    ] dev-lang/python-2.6.6-r2 [2.7.2] USE="gdbm ipv6 ncurses readline sqlite ssl threads tk (wide-unicode) xml -berkdb -build -doc -examples -wininst" 10,838 kB
[ebuild  N     ] dev-python/pmw-1.3.2-r2  USE="-doc -examples" 0 kB
[ebuild  N     ] sci-chemistry/pymol-1.4.1  USE="-apbs -numpy -vmd -web" 0 kB


This is a problem, obviously. Here is output from eix -C dev-lang python, in case it is helpful:
Code: Select all
eix -C dev-lang python
# eix -C dev-lang python
[D] dev-lang/python
     Available versions: 
        (2.4)   2.4.6
        (2.5)   2.5.4-r4
        (2.6)   2.6.5-r3 2.6.6-r2 ~2.6.7-r2
        (2.7)   2.7.1-r1 [M]~2.7.1-r2 ~2.7.2-r2
        (3.1)   [m]3.1.3-r1 [m]~3.1.4-r2
        (3.2)   ~3.2-r2
        {-berkdb bootstrap build +cxx doc elibc_uclibc examples gdbm ipv6 +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml}
     Installed versions:  2.7.2(2.7)(11:09:00 AM 06/29/2011)(gdbm ipv6 ncurses readline sqlite ssl threads wide-unicode xml -berkdb -build -doc -elibc_uclibc -examples -tk -wininst)
     Homepage:            http://www.python.org/
     Description:         Python is an interpreted, interactive, object-oriented programming language.
Last edited by mhodak on Fri Aug 19, 2011 10:20, edited 1 time in total.
mhodak
Baby Hen
 
Posts: 15
Joined: Thu Aug 18, 2011 23:48

Re: Help with python from portage

Postby joost » Fri Aug 19, 2011 10:17

yes the Gentoo python eclass is a big mess.
We are going to try to bend things around or fork the builds.

Don't mess with Portage/Python/Entropy or you will certyainly foo/bar your system.
:wink:
joost
Sagely Hen
 
Posts: 2604
Joined: Fri Nov 17, 2006 12:11
Location: The Netherlands

Re: Help with python from portage

Postby mhodak » Fri Aug 19, 2011 10:36

joost wrote:yes the Gentoo python eclass is a big mess.
We are going to try to bend things around or fork the builds.

Don't mess with Portage/Python/Entropy or you will certyainly foo/bar your system.
:wink:

Believe it or not, I am trying to stay as close as possible to pure Entropy, but since I need two masked packages, I do not have much choice :)

I would actually be quite happy if I only need pmw and pymol form portage without messing with python. Why is it that portage insists on bringing in python? Is it because it thinks that python from Entropy is missing tk flag or is something else going on?
mhodak
Baby Hen
 
Posts: 15
Joined: Thu Aug 18, 2011 23:48

Re: Help with python from portage

Postby joost » Fri Aug 19, 2011 11:00

Not going into it in depth, but if you really really need it perhaps try your luck with a different distro.
The whole python +tk thing is in the works.
joost
Sagely Hen
 
Posts: 2604
Joined: Fri Nov 17, 2006 12:11
Location: The Netherlands

Re: Help with python from portage

Postby mhodak » Fri Aug 19, 2011 11:27

joost wrote:Not going into it in depth, but if you really really need it perhaps try your luck with a different distro.
The whole python +tk thing is in the works.

I do need those packages for my work, but I am not easily discouraged and I really like Sabayon. Besides, I have been using Gentoo on my home machine for a long time now.

So, to answer my own question, yes, portage wants to bring in python because pmw and pymol require python with tk. Specifically, their ebuilds contain the following line:
Code: Select all
PYTHON_USE_WITH="tk"

After commenting this line and digesting new ebuilds, installing pymol does not require replacing python and both pmw and pymol install without problem (since python-tk provides what is necessary).

I really like this solution. I have only added two non-Sabayon packages, which are not crucial to the system, and I have only messed with portage, not entropy. The proper solution will of course require putting those two modified packages into my own overlay but it is only two packages.

Am I overlooking some downsides to this solution?
mhodak
Baby Hen
 
Posts: 15
Joined: Thu Aug 18, 2011 23:48

Next

Return to Entropy|Equo|Rigo Package Managers

Who is online

Users browsing this forum: No registered users and 1 guest