Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
python-exec won't let me install python-3.13
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
zwol
n00b
n00b


Joined: 24 May 2024
Posts: 6

PostPosted: Thu Oct 10, 2024 1:54 pm    Post subject: python-exec won't let me install python-3.13 Reply with quote

I'm trying to install the shiny new python-3.13 in order to test stuff with it. I don't want /usr/bin/python3 to be changed. I'm getting this error after unmasking dev-lang/python-3.13.0:

Code:
# emerge dev-lang/python:3.13

Calculating dependencies... done!
Dependency resolution took 11.20 s (backtrack: 0/20).

emerge: there are no ebuilds to satisfy "dev-lang/python-exec[python_targets_python3_13(-)]".
(dependency required by "dev-lang/python-3.13.0::gentoo" [argument])


"python_targets_python3_13" is not listed in the USE flag report for python-exec (equery u). I looked at the ebuild and saw

Code:
PYTHON_COMPAT=( python3_{10..12} pypy3 )


so I tried making a local -r0 ebuild with {10..12} changed to {10..13} but that didn't make any difference.

I also see a bunch of logic in the ebuild that depends on the contents of an array called _PYTHON_ALL_IMPLS, which, after digging quite deep turns out to be defined in python-utils-r1.eclass - but it already has python3_13 as an element. So that's not it either.

And I found some old posts on this forum talking about similar problems if you have Python-related overrides in /etc/portage but I don't:

Code:
# grep -ri python /etc/portage
/etc/portage/package.accept_keywords/50apps:=dev-lang/python-3.13.0 ~amd64
/etc/portage/make.conf:     privsep pulseaudio python -qt5 raw -screencast svg2 -telemetry vaapi \


So I'm stuck. What do I need to do to be allowed to install dev-lang/python:3.13 as a secondary implementation of Python (that is, without changing what /usr/bin/python3 runs and without rebuilding any packages to support it)?
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2829

PostPosted: Thu Oct 10, 2024 2:44 pm    Post subject: Reply with quote

The ebuild is already fine as-is, I assume(?) that you are in stable where python_targets_python3_13 is masked which leads to portage being unable to emerge it with the USE set.

Aka, it probably looks like that:
Code:
$ emerge -pvq python-exec
[ebuild   R   ] dev-lang/python-exec-2.4.10  USE="(native-symlinks) -test" PYTHON_TARGETS="(pypy3) (python3_10) (python3_11) (python3_12) (-python3_13)"
Note the (-python3_13), the () implying that it can't be changed.

If really must, you can unmask it albeit using it in stable before it's ready is likely to be messy.

https://wiki.gentoo.org/wiki/Project:Python/PYTHON_TARGETS
Back to top
View user's profile Send private message
zwol
n00b
n00b


Joined: 24 May 2024
Posts: 6

PostPosted: Thu Oct 10, 2024 3:01 pm    Post subject: Reply with quote

Thanks! Yeah, I'm on stable. The instructions on that wiki page do seem to have unstuck it.

Code:
# emerge -pvq python-exec
[ebuild   R   ] dev-lang/python-exec-2.4.10  USE="(native-symlinks) -test" PYTHON_TARGETS="(pypy3) (python3_10) (python3_11) (python3_12) (-python3_13)"
# cat > /etc/portage/profile/use.stable.mask <<\EOF
# allow installation of python 3.13 interpreter
-python_targets_python3_13
-python_single_target_python3_13
EOF
# emerge -pvq python-exec
[ebuild   R   ] dev-lang/python-exec-2.4.10  USE="(native-symlinks) -test" PYTHON_TARGETS="(pypy3) (python3_10) (python3_11) (python3_12) (python3_13*)"


and (after actually doing the rebuild) it let me install the 3.13 interpreter. And a @world rebuild isn't trying to add 3.13 support to anything else, so I think I'm good now.
Back to top
View user's profile Send private message
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 334

PostPosted: Thu Oct 10, 2024 3:50 pm    Post subject: Reply with quote

Also check eselect python to make sure your python interpreter preference order matches your personal preferences.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2289

PostPosted: Thu Oct 10, 2024 4:04 pm    Post subject: Reply with quote

bstaletic wrote:
Also check eselect python to make sure your python interpreter preference order matches your personal preferences.


This is for system-wide settings, OP most probably wants python 3.13 for something specific. There are other ways to use python 3.13 e.g. using the shebang or explicitly invoking python 3.13 on the command line to execute a script.

Eselect python is mostly unnecessary these days.

Best Regards,
Georgi
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