Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to remove python2.7
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2748

PostPosted: Thu Oct 01, 2020 5:00 pm    Post subject: Reply with quote

figueroa wrote:
That's enough. It boils down to polkit and udisks, both of which provide functionality I need/want. If only they didn't chain up to need spidermonkey, I could do away with python2.7. I don't have anything against spidermonkey. Upstream should get their act together; or I'm looking forward to duktape.
If by upstream you mean mozilla, they removed py:2.7 requirement with about all their >=78 products around July. Gentoo updated ebuilds in the last few days to remove the dep (firefox, thunderbird, spidermonkey), but they're still in ~testing given kinda early and needs testing.

So with ~testing >=polkit-0.118, which depend on spidermonkey:78, you don't need python2.7 (but you do need llvm+rust... although nowadays many have rust due to librsvg, and llvm due to mesa, packages that need those will just keep coming).
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2979
Location: Edge of marsh USA

PostPosted: Thu Oct 01, 2020 6:00 pm    Post subject: Reply with quote

Actually, by upstream I meant spidermonkey, but if ~polkit requires spidermonkey without python 2.7 dependency, I'll try it:
I've put in /etc/portage/package.accept_keywords
Code:

=sys-auth/polkit-0.118 ~amd64
=dev-lang/spidermonkey-78.3.0 ~amd64


With that done, I need to reboot to see how it works, since I'm not sure what starts polkitd.

I'll still be left with dev-libs/gjs-1.64.4 (latest version) and it's hard depency on spidermonkey-68.

I'll be back!
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2748

PostPosted: Thu Oct 01, 2020 6:06 pm    Post subject: Reply with quote

figueroa wrote:
I'll still be left with dev-libs/gjs-1.64.4 (latest version) and it's hard depency on spidermonkey-68.
Not familiar with the package but looks like upstream already migrated to spidermonkey:78 (https://gitlab.gnome.org/GNOME/gjs/-/issues/329), guess it's up to gentoo to bring gjs-1.66 in now that :78 is there, I don't see an open bug for it so no idea on ETA.
Quote:
I'll be back!
Good luck :)
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2979
Location: Edge of marsh USA

PostPosted: Thu Oct 01, 2020 6:48 pm    Post subject: Reply with quote

Ionen wrote:
figueroa wrote:
I'll still be left with dev-libs/gjs-1.64.4 (latest version) and it's hard depency on spidermonkey-68.
Not familiar with the package but looks like upstream already ported to spidermonkey:78 (https://gitlab.gnome.org/GNOME/gjs/-/issues/329), guess it's up to gentoo to bring gfs-1.66 in.
Quote:
I'll be back!
Good luck :)


I'm back. Everything seems to be normal. polkit-0.118 loaded and is doing its thing happily.
Code:
$ sudo grep polk /var/log/everything/current
Oct 01 14:03:20 [dbus-daemon] [system] Activating service name='org.freedesktop.PolicyKit1' requested by ':1.13' (uid=1000 pid=4092 comm="lxpolkit " label="kernel") (using servicehelper)
Oct 01 14:03:20 [polkitd] Started polkitd version 0.118
Oct 01 14:03:22 [polkitd] Loading rules from directory /etc/polkit-1/rules.d
Oct 01 14:03:22 [polkitd] Loading rules from directory /usr/share/polkit-1/rules.d
Oct 01 14:03:22 [polkitd] Finished loading, compiling and executing 1 rules
Oct 01 14:03:22 [polkitd] Acquired the name org.freedesktop.PolicyKit1 on the system bus
Oct 01 14:03:22 [polkitd] Registered Authentication Agent for unix-session:2 (system bus name :1.13 [lxpolkit], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.utf8)


So, I'm left with the following dependency tree:
Code:
$ emerge -cpv =python-2.7.18-r2

Calculating dependencies... done!
  dev-lang/python-2.7.18-r2 pulled in by:
    dev-lang/spidermonkey-68.12.0 requires dev-lang/python:2.7

$ equery d dev-lang/spidermonkey:68
 * These packages depend on dev-lang/spidermonkey:
dev-libs/gjs-1.64.4 (dev-lang/spidermonkey:68)


# equery d gjs
 * These packages depend on gjs:
app-crypt/libsecret-0.20.3 (introspection ? >=dev-libs/gjs-1.32)
gnome-extra/gnome-characters-3.34.0 (>=dev-libs/gjs-1.50)
(I could live without gnome-characters, but I like it.)

$ equery d libsecret
 * These packages depend on libsecret:
app-crypt/pinentry-1.1.0-r3 (gnome-keyring ? app-crypt/libsecret)
app-text/evince-3.36.7 (gnome-keyring ? >=app-crypt/libsecret-0.5)
gnome-base/gvfs-1.44.1 (gnome-keyring ? app-crypt/libsecret)
media-video/vlc-3.0.11.1 (gnome-keyring ? app-crypt/libsecret)
sys-apps/gnome-disk-utility-3.36.3 (>=app-crypt/libsecret-0.7)
(gnome-keyring is only set for pinentry.)

pinentry I need for gnupg, and pinentry depends on libsecret, so bottom line, I'll be waiting for an update to dev-libs/gjs that doesn't depend on spidermonkey-68. Besides that I WANT gnome-disk-utility. Almost there, and I CAN wait. Happy.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2979
Location: Edge of marsh USA

PostPosted: Fri Oct 02, 2020 5:40 pm    Post subject: Reply with quote

Ionen wrote:
Not familiar with the package but looks like upstream already migrated to spidermonkey:78 (https://gitlab.gnome.org/GNOME/gjs/-/issues/329), guess it's up to gentoo to bring gjs-1.66 in now that :78 is there, I don't see an open bug for it so no idea on ETA.

I filed bug. https://bugs.gentoo.org/746170
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2979
Location: Edge of marsh USA

PostPosted: Fri Oct 02, 2020 7:24 pm    Post subject: Reply with quote

On my x86 server (does have XFCE, LXDE installed, just not used, no display manager) after adding to /etc/portage/package.accept_keywords:
Code:

=sys-auth/polkit-0.118 ~amd64
=dev-lang/spidermonkey-78.3.0 ~amd64

and updating, I was able to deplean my way free of Python-2.7.
Code:
# emerge -cp
...
 Calculating dependencies... done!
>>> Calculating removal order...

>>> These are the packages that would be unmerged:

 dev-python/wxpython
    selected: 3.0.2.0
   protected: none
     omitted: none

 dev-lang/spidermonkey
    selected: 60.5.2_p0-r4
   protected: none
     omitted: 78.3.0

 net-libs/libproxy
    selected: 0.4.15-r1
   protected: none
     omitted: none

 dev-python/beautifulsoup
    selected: 4.9.1
   protected: none
     omitted: none

 dev-python/pyopengl
    selected: 3.1.0
   protected: none
     omitted: none

 virtual/libffi
    selected: 3.3_rc0
   protected: none
     omitted: none

 dev-python/soupsieve
    selected: 2.0.1
   protected: none
     omitted: none

 media-libs/freeglut
    selected: 3.2.1
   protected: none
     omitted: none

 dev-lang/python
    selected: 2.7.18-r2
   protected: none
     omitted: 3.7.9 3.8.5
...


EDIT - ADDED: Rather than add another post, I'll just add, here, that I did the same with my amd64 desktop. Main difference is that I had to remove gome-characters which depended on gjs which depended on a version of spidermonkey that depends on python-2.7. I like Gnome-Characters and find it useful. When gjs is updated so it's depency tree is free of python 2.7 I'll add it again.

ADDED at 10/3/2020 0004: gnome-extra/gucharmap is a suitable substitute for gnome-extra/gnome-characters. I don't know how I missed that.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
EasterParade
l33t
l33t


Joined: 26 Jul 2003
Posts: 938

PostPosted: Sat Oct 03, 2020 4:39 pm    Post subject: Reply with quote

Would you please allow my asking what´s the point of a big move towards removing python 2.7 if there´re packages that still need it?
Why not clean out or replace each package that pulls it in first?
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2979
Location: Edge of marsh USA

PostPosted: Sat Oct 03, 2020 5:25 pm    Post subject: Reply with quote

Because Python-2.7 is deprecated, no longer supported, subject to removal. See the new news item about Python-2.7.

I have a mature (old) remote x86 server where VirtualBox 5 is mission critical, and it depends on Python 2. I've put VirtualBox and related ebuilds into local repository. I'm about to do that with =python-2.7.18-r2. It's not a good long-tern solution, but will let me nurse that puppy along for a few more years.

Otherwise, I'm now Python 2 free on my local amd64 desktop and x86 server. The future calls.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
EasterParade
l33t
l33t


Joined: 26 Jul 2003
Posts: 938

PostPosted: Sat Oct 03, 2020 5:52 pm    Post subject: Reply with quote

This was a rhetorical question.
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1482

PostPosted: Sat Oct 03, 2020 6:50 pm    Post subject: Reply with quote

Upstream the new gjs-1.66 is described adding a bunch of new js script capabilities to gnome. I wonder if current gnome-3.36.5 could run using an updated gjs-1.66 instead of gjs-1.64?
Do we have to wait for the next gnome-38 release on Gentoo for this ?
Back to top
View user's profile Send private message
EasterParade
l33t
l33t


Joined: 26 Jul 2003
Posts: 938

PostPosted: Sun Oct 04, 2020 7:03 am    Post subject: Reply with quote

My apologies for being impolite. I don´t think removing Python 2.7 is unreasonable; on the contrary.
Python 2.7 is dead and it is common knowledge for a long time now.
I question the way we try to remove it without actually removing it causing chaos on the system.
Look, I tried to using the method described in the news item.
But Python 2.7 is back again like a zombie and I have this, taking certifi as an example:
Code:
emerge -pv certifi

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

Calculating dependencies... done!
[ebuild   R    ] dev-python/certifi-10001::gentoo  USE="-test" PYTHON_TARGETS="python2_7 python3_7 (-pypy3) -python3_6 -python3_8 (-python3_9)" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

WARNING: One or more updates/rebuilds have been skipped due to a dependency conflict:

dev-python/certifi:0

  (dev-python/certifi-10001-r1:0/0::gentoo, ebuild scheduled for merge) USE="-test" ABI_X86="(64)" PYTHON_TARGETS="python3_7 (-pypy3) -python3_6 -python3_8 (-python3_9)" conflicts with
    >=dev-python/certifi-2016.9.26[python_targets_python2_7(-),python_targets_python3_7(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] required by (dev-python/setuptools-46.4.0-r3:0/0::gentoo, installed) USE="-test" ABI_X86="(64)" PYTHON_TARGETS="python2_7 python3_7 (-pypy3) -python3_6 -python3_8 (-python3_9)"

And please do not make me believe that it´s my fault.

I refer hearby to my question again: what´s the point. It´s inconsistent.
If you want Python 2.7 disappear remove it alltogether or leave it where it is.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3701

PostPosted: Sun Oct 04, 2020 7:27 am    Post subject: Reply with quote

Isn't dev-python/setuptools installed with python2_7?
Code:
emerge -e -p -v world 2>null|grep -v nomerge|grep " python2_7"
[ebuild   R    ]   dev-python/olefile-0.46::gentoo  USE="-doc" PYTHON_TARGETS="(-pypy3) python2_7 -python3_6 python3_7 -python3_8 (-python3_9)" 0 KiB
[ebuild   R    ]    dev-python/setuptools-46.4.0-r3::gentoo  USE="-test" PYTHON_TARGETS="(-pypy3) python2_7 python3_6 python3_7 -python3_8 (-python3_9)" 0 KiB
[ebuild   R    ]    dev-python/certifi-10001::gentoo  USE="-test" PYTHON_TARGETS="(-pypy3) python2_7 python3_6 python3_7 -python3_8 (-python3_9)" 0 KiB
What do you have?

I guess it's dirty hack, but I sometimes solve USE flag apparent conflct issues, by backuping as binpackage, remove them, e.g. emerge -C, then reinstall.

Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6135
Location: Dallas area

PostPosted: Sun Oct 04, 2020 10:10 am    Post subject: Reply with quote

I had long removed the need for python2 to generate any files for anything other than a handful of apps.

It's relatively simple, perhaps too simple for the gentoo devs to grasp.

first is this
Code:
$ head -1 /etc/portage/package.use
*/* PYTHON_TARGETS: -* python3_7


This shuts off everything except the version(s) of python that I want, note the lack of python 2.7.

Then do "emerge -pvuDU @world"
and for each package that complains about needing python 2.7 then add

<category</<pkg> python_targets_python2_7

to package.use, repeat the emerge until it runs clean.

Then you can run it without the pretend option and it should remove all need for python 2.7 except for the few that you have designated.

With the mask in package.use no new packages will be applied to python 2.7.
Though you'll still have to rebuild packages until the devs figure out how to clean up the mess they've made of python.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2979
Location: Edge of marsh USA

PostPosted: Sun Oct 04, 2020 12:52 pm    Post subject: Reply with quote

Anon-E-moose wrote:

first is this
Code:
$ head -1 /etc/portage/package.use
*/* PYTHON_TARGETS: -* python3_7


I followed your brilliant advice, but later changed the package.use line to read:
Code:
*/* PYTHON_TARGETS: -python2_7 python3_7

This seems better to me, to first ban, explicitly, the python I DON'T want, and then to name the preferred python, without explicitly banning all other python versions.

It's a mere personal preference as it accomplishes the same thing. I am, indeed, now python-2.7-free on my two main Gentoo systems.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
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
Goto page Previous  1, 2
Page 2 of 2

 
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