Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved support for system environment #3107

Merged
merged 3 commits into from
Oct 23, 2020
Merged

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