Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] [RFC] mark python3 site-packages as externally managed
@ 2023-05-01 18:27 classabbyamp
  2023-05-01 19:12 ` ahesford
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: classabbyamp @ 2023-05-01 18:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1675 bytes --]

New issue by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/issues/43703

Description:
https://peps.python.org/pep-0668/

By adding a file `/usr/lib/python3.X/EXTERNALLY_MANAGED`, pip will not let users install python modules with `pip` outside of virtual environments

![image](https://user-images.githubusercontent.com/5366828/235501708-689a19a2-a6bf-451a-ab58-cba48f53bb5a.png)

### Pros
- will prevent people from breaking xbps-installed python modules by using pip outside a venv

### Cons
- breaks `pip install --user` too (can be [solved](https://bugs.gentoo.org/895410#c4))
- may break some void-based containers (or similar things) that install things with pip
    - solutions:
        - `pip --break-system-packages`
        - `doas pip config set install.break-system-packages True`
        - `noextract` on the EXTERNALLY-MANAGED file (could be done by default in void's official containers)

### Prior Art

- gentoo implements this, see [here](https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-python/gentoo-common/gentoo-common-1.ebuild#n17) and [here](https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-lang/python/python-3.11.3.ebuild#n462)
- ubuntu [apparently does this](https://ubuntuforums.org/showthread.php?t=2485257), but I can't find their source packages to check
- Alpine implemented this for ~1 day until people complained that it broke their containers (this is probably less of a concern for void, and could be mitigated)
- arch has not done this, from what I can tell
- debian and fedora put distro-packaged python modules in a different directory

cc @void-linux/pkg-committers 

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-10-06 16:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-01 18:27 [ISSUE] [RFC] mark python3 site-packages as externally managed classabbyamp
2023-05-01 19:12 ` ahesford
2023-05-01 19:20 ` chrysos349
2023-05-01 20:23 ` icp1994
2023-07-09 16:05 ` CtrlC-Root
2023-07-09 16:12 ` CtrlC-Root
2023-07-09 16:31 ` icp1994
2023-07-09 16:55 ` classabbyamp
2023-07-09 17:07 ` CtrlC-Root
2023-07-10 10:41 ` 0x5c
2023-07-10 17:07 ` CtrlC-Root
2023-07-10 17:08 ` classabbyamp
2023-07-10 17:09 ` classabbyamp
2023-10-06 16:26 ` [ISSUE] [CLOSED] " ahesford
2023-10-06 16:26 ` ahesford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).