On Sunday, 7 March 2021 18:43:29 GMT Steven Lembark wrote:
> Checking my environment, I'd expect that "python" is 3.9.1, I think?
> 
>     # which python
>     /usr/bin/python
> 
>     # ls -al /usr/bin/python
>     lrwxrwxrwx 1 root root 13 Oct 20 10:46 /usr/bin/python -> python-exec2c
> 
>     # /usr/bin/python --version;
>     Python 3.9.1
> 
>     (ins)root@dizzy ~ # eselect python list;
>     Available Python interpreters, in order of preference:
>       [1]   python3.9
>       [2]   python3.6
>       [3]   python3.8 (fallback)
>       [4]   python3.7 (fallback)
>       [5]   python2.7 (fallback)
> 
> 
> Yet when I "emerge pyyaml" it seems to prefer 3.8 (see ? below):
> 
>     (cmd)root@dizzy ~ # emerge pyyaml
>     Calculating dependencies... done!
> 
>     >>> Verifying ebuild manifests
>     >>> 
>     >>> Emerging (1 of 1) dev-python/pyyaml-5.4.1::gentoo
> 
>      * pyyaml-5.4.1.gh.tar.gz BLAKE2B SHA512 size ;-) ...                   
>                                                            [ ok ]
>     >>> Unpacking source...
>     >>> Unpacking pyyaml-5.4.1.gh.tar.gz to
>     >>> /tmp/portage/dev-python/pyyaml-5.4.1/work Source unpacked in
>     >>> /tmp/portage/dev-python/pyyaml-5.4.1/work
>     >>> Preparing source in
>     >>> /tmp/portage/dev-python/pyyaml-5.4.1/work/pyyaml-5.4.1 ...
>      * Applying pyyaml-5.1-cve-2017-18342.patch ...                         
>                                                            [ ok ]
>     >>> Source prepared.
>     >>> Configuring source in
>     >>> /tmp/portage/dev-python/pyyaml-5.4.1/work/pyyaml-5.4.1 ...
>  ?   * Using python3.8 in global scope
>  ?   * python3_8: running distutils-r1_run_phase python_configure_all
> 
>     >>> Source configured.
> 
>     ^C
> 
>     Exiting on signal 2
> 
>     >>> Compiling source in
>     >>> /tmp/portage/dev-python/pyyaml-5.4.1/work/pyyaml-5.4.1 ...
>     ^Csandbox:stop  caught signal 2 in pid 8217
>     Sandboxed process killed by signal: Interrupt
>      * The ebuild phase 'die_hooks' has been killed by signal 2.
> 
>      * Messages for package dev-python/pyyaml-5.4.1:
>      * Log file:
> /var/log/portage/dev-python:pyyaml-5.4.1:20210307-183833.log
> 
> Q: Is it reasonable to simply remove everything other than 3.9 and
>    some version of 2.7?
> 
> Trying to build 3.9 for one of my co-workers was hell, we ended up
> using 3.8. Would it make more sense to remove 3.9?
> 
> Not entirely sure why I have so many versions of python left behind
> by upgrades.

Have you tried:

eselect python cleanup
emerge --depclean -v -p
emerge @preserved-rebuild -v -a

I don't have any python targets specified and on a (mostly) stable system I 
get:

$ /usr/bin/python --version
Python 3.8.7

$ eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.9 (fallback)

$ ls -al /usr/bin/python
lrwxrwxrwx 1 root root 13 Feb 13 09:04 /usr/bin/python -> python-exec2c

$ emerge -1Dvp pyyaml

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] dev-python/pyyaml-5.4.1::gentoo  USE="libyaml -examples -
test" PYTHON_TARGETS="python3_8 (-pypy3) -python3_7 -python3_9" 170 KiB

Total: 1 package (1 new), Size of downloads: 170 KiB

It would use PYTHON_TARGETS="python3_8" which is the default on this system, 
since I have not modified my python settings.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to