Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [ISSUE] [RFC] mark python3 site-packages as externally managed
Date: Mon, 01 May 2023 20:27:04 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-43703@inbox.vuxu.org> (raw)

[-- 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 

             reply	other threads:[~2023-05-01 18:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-01 18:27 classabbyamp [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-43703@inbox.vuxu.org \
    --to=classabbyamp@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).