Skip to content

Comments

Improved support for system environment#3107

Merged
sdispater merged 3 commits intopython-poetry:1.1from
abn:issue/3079
Oct 23, 2020
Merged

Improved support for system environment#3107
sdispater merged 3 commits intopython-poetry:1.1from
abn:issue/3079

Conversation

@abn
Copy link
Member

@abn abn commented Oct 6, 2020

utils/env: better support system site packages dir
This change improves handling of site-packages under system env, by
gracefully handling fallbacks to user site when required and possible.

Resolves: #3079

This was verified using the following Dockerfile.

FROM python:3.8

RUN useradd -m user
RUN pip install git+https://github.com/abn/poetry.git@issue/3079

USER user
WORKDIR /home/user

RUN poetry config virtualenvs.create false
RUN poetry new foobar

WORKDIR /home/user/foobar

RUN poetry install
RUN poetry run pip show foobar
RUN ls -all /home/user/.local/lib/python3.8/site-packages

editable: use writable script dir for system env

This change ensures that, When using system environment, poetry falls
back to userbase if default location is not writable.

utils/env: ensure we create user directories

@abn abn added the kind/bug Something isn't working as expected label Oct 6, 2020
@abn abn added this to the 1.1 milestone Oct 6, 2020
@abn abn requested a review from a team October 6, 2020 19:08
abn added 2 commits October 23, 2020 03:23
This change improves handling of site-packages under system env, by
gracefully handling fallbacks to user site when required and possible.

Resolves: python-poetry#3079
This change ensures that, When using system environment, poetry falls
back to `userbase` if default location is not writable.
@abn abn changed the title utils/env: better support system site packages dir Improved support for system environment Oct 23, 2020
Copy link
Member

@sdispater sdispater left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@sdispater sdispater merged commit 1340723 into python-poetry:1.1 Oct 23, 2020
@abn abn deleted the issue/3079 branch October 23, 2020 19:21
@github-actions
Copy link

github-actions bot commented Mar 1, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

kind/bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants