Github messages for voidlinux
 help / color / mirror / Atom feed
From: ahesford <ahesford@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Closed]: python3: mark as EXTERNALLY-MANAGED
Date: Fri, 06 Oct 2023 18:25:37 +0200	[thread overview]
Message-ID: <20231006162537.40-UFG3Jfu9Zx7IWjVrafmqLmDNNCNAQXDeAyWmfHi4@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-43735@inbox.vuxu.org>

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

There's a closed pull request on the void-packages repository

python3: mark as EXTERNALLY-MANAGED
https://github.com/void-linux/void-packages/pull/43735

Description:
this prevents users from breaking xbps-installed python3 packages by using pip outside of a virtual environment. Error message adapted from gentoo's, debian's, and the example from PEP 668

see https://peps.python.org/pep-0668/ for more details

closes #43703

```
$ pip install --user foo
error: externally-managed-environment

× This environment is externally managed
╰─> 
    The system-wide Python installation in Void should be maintained
    using the system package manager, xbps.
    
    If the package in question is not packaged for Void, please
    consider installing it inside a virtual environment, e.g.:
    
    python3 -m venv /path/to/venv
    . /path/to/venv/bin/activate
    pip install mypackage
    
    To exit the virtual environment, run:
    
    deactivate
    
    The virtual environment is not deleted, and can be re-entered by
    re-sourcing the activate file.
    
    To automatically manage virtual environments, pipx (from python3-pipx)
    can be used.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
```

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### TODOs

- [ ] write a news post notifying users of this change
- [x] (potentially) update [void-linux/void-containers](https://github.com/void-linux/void-containers) containers to not break due to this change

cc: @ahesford


      parent reply	other threads:[~2023-10-06 16:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03 21:47 [PR PATCH] [RFC] " classabbyamp
2023-10-06 16:25 ` ahesford
2023-10-06 16:25 ` ahesford [this message]

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=20231006162537.40-UFG3Jfu9Zx7IWjVrafmqLmDNNCNAQXDeAyWmfHi4@z \
    --to=ahesford@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).