Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]: python_single_target_python2_7 ...
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
are
Apprentice
Apprentice


Joined: 03 Jan 2006
Posts: 180

PostPosted: Sun Jan 06, 2013 8:09 am    Post subject: [SOLVED]: python_single_target_python2_7 ... Reply with quote

Guys,

I am in heavy IT industry for more then 20 years, I am fluent in brainfuck and won some perl obfuscation contests but THIS is insane:

Code:

The following required use constraints are unmet for dev-libs/gobject-introspection-1.34.2-r1:
 *     || ( python_targets_python2_7 ) ^^ ( python_single_target_python2_7 ) python_single_target_python2_7? ( python_targets_python2_7 )


I am starring at this line for several minutes now and everytime when I reach the end I have forgotten how it started.

My settings are:

*/* PYTHON_TARGETS: -* python2_7
*/* PYTHON_SINGLE_TARGET: -*

and these worked very well just a week ago. Any hints please?


Last edited by are on Mon Jan 07, 2013 5:46 am; edited 1 time in total
Back to top
View user's profile Send private message
floppymaster
Developer
Developer


Joined: 07 Jul 2010
Posts: 217
Location: Detroit, MI, USA

PostPosted: Sun Jan 06, 2013 9:29 pm    Post subject: Reply with quote

Don't put -* in those variables.

Here are some reasonable settings.

PYTHON_TARGETS="python2_7"
PYTHON_SINGLE_TARGET="python2_7"
Back to top
View user's profile Send private message
floppymaster
Developer
Developer


Joined: 07 Jul 2010
Posts: 217
Location: Detroit, MI, USA

PostPosted: Sun Jan 06, 2013 9:37 pm    Post subject: Reply with quote

To expand on that, this condition means that exactly one of ( python_single_target_python2_7 ) must be enabled.

^^ ( python_single_target_python2_7 )

I know the error message is bad here; typical REQUIRED_USE garbage messaging.
Back to top
View user's profile Send private message
are
Apprentice
Apprentice


Joined: 03 Jan 2006
Posts: 180

PostPosted: Mon Jan 07, 2013 12:02 am    Post subject: Reply with quote

FloppyMaster, thanks a lot for the help.

I understand that part, which means Exlusive OR
Code:
( python_targets_python2_7 ) ^^ ( python_single_target_python2_7 )


but what about that second, which pulls python_targets_python2_7 if python_single_target_python2_7 is set:
Code:
python_single_target_python2_7? ( python_targets_python2_7


In general these python stuff confuses the hell out of me. The fact that we need python_targets is bad already! (As far as I can remember there are no gcc_targets and also no java_targets. perl?). But now we have even two and I wonder on the pros and cons of that design approach.


Finally I found out, that I could remove again the PYTHON_SINGLE_TARGET="python2_7" completely. It looks like it was only temporally necessary for paludis.

Best regads!
Back to top
View user's profile Send private message
floppymaster
Developer
Developer


Joined: 07 Jul 2010
Posts: 217
Location: Detroit, MI, USA

PostPosted: Mon Jan 07, 2013 5:24 am    Post subject: Reply with quote

You might find the Gentoo Python user guide helpful.

http://www.gentoo.org/proj/en/Python/python-r1/user-guide.xml

We have the python_targets stuff because Gentoo lets you install more than one version of Python at once, and each version needs a separate copy of any installed code at run time.

Perl only allows one version at once.
Java allows multiple versions, but they can share the same compiled code (jars).
GCC allows multiple versions, but it produces native machine code that does not require an interpreter.

Python is most similar to Ruby and PHP, which have similar use-expand flags.
Back to top
View user's profile Send private message
are
Apprentice
Apprentice


Joined: 03 Jan 2006
Posts: 180

PostPosted: Mon Jan 07, 2013 5:58 am    Post subject: Reply with quote

floppymaster wrote:

Java allows multiple versions, but they can share the same compiled code (jars).


If I am not misguided there are dependencies to a certain runtime. You can't run 1.7 jars on 1.4 JRE and I am confident that you can not run any 1.6 JAR on a 1.7 JRE (watch out for validateTree() for example). Still we are fine without JVM_TARGETS. Instead of you have to eselect you jvm and that mechanism worked well on python for years.

Furthermore I wonder why we implement TARGETS and SINGLE_TARGET instead of just fixing the few showstoppers (like java-toolkit) and port them to python3 OR just stick with python2. These TARGETS are useful for perhaps 3% of your user-base (while these users are capable to work around) but they hit 100% of the users who have no interest in python/ruby/bloat at all.

Nevertheless it is working now at least and I thank you for kind help.

Best regards!
Back to top
View user's profile Send private message
ewill3
n00b
n00b


Joined: 22 Feb 2004
Posts: 3

PostPosted: Wed Jan 09, 2013 12:59 am    Post subject: Reply with quote

floppymaster wrote:
Don't put -* in those variables.

Here are some reasonable settings.

PYTHON_TARGETS="python2_7"
PYTHON_SINGLE_TARGET="python2_7"


Just to drive everyone crazy: I'm seeing a similar problem in =dev-libs/gobject-introspection-1.34.2-r1. I've already changed the variables to these values in /etc/profile/make.conf and fiddled a bit with /etc/portage/package.use/gobject-introspection (python_targets_python2_7 and python_single_target_python2_7 being the relevant "use flags", according to the docs).

$ emerge -pqv 'dev-libs/gobject-introspection'
[ebuild U ] dev-libs/gobject-introspection-1.34.2-r1 [1.32.1] USE="-doctool {-test} (-doc%*)" PYTHON_SINGLE_TARGET="python2_7%*" PYTHON_TARGETS="python2_7%*"

Why the %* at the end of the target variables? Is this a bug or a feature? Obviously it's at least responding to my settings, so that's a plus.

Unfortunately, it still falls over:

$ emerge --oneshot dev-libs/gobject-introspection
>>> Emerging (1 of 1) dev-libs/gobject-introspection-1.34.2-r1
* gobject-introspection-1.34.2.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ]
* No Python implementation selected for the build. Please set
* the PYTHON_SINGLE_TARGET variable in your make.conf to one
* of the following values:
*
* python2_7

* ERROR: dev-libs/gobject-introspection-1.34.2-r1 failed (setup phase):
* No supported Python implementation in PYTHON_SINGLE_TARGET.
...

I can post a formal bug report (on what? portage? this particular package?) if you like, but am wondering how to fix this.
_________________
It's still legal to remain .sigless
Back to top
View user's profile Send private message
jrussia
Tux's lil' helper
Tux's lil' helper


Joined: 29 Aug 2012
Posts: 89
Location: Chicago

PostPosted: Wed Jan 09, 2013 1:41 am    Post subject: Reply with quote

floppymaster wrote:


$ emerge -pqv 'dev-libs/gobject-introspection'
[ebuild U ] dev-libs/gobject-introspection-1.34.2-r1 [1.32.1] USE="-doctool {-test} (-doc%*)" PYTHON_SINGLE_TARGET="python2_7%*" PYTHON_TARGETS="python2_7%*"

Why the %* at the end of the target variables? Is this a bug or a feature? Obviously it's at least responding to my settings, so that's a plus.


I can post a formal bug report (on what? portage? this particular package?) if you like, but am wondering how to fix this.



% means it is a new USE flag option for this build
* means it is a new USE flag change for the build on your machine (e.g. if you choose to rebuild this later with "doctool" enabled then you would see "doctool*")

Also, the particular bug you are seeing right now looks like it was fixed in the Portage tree today, if you sync now it will hopefully be resolved.
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