Skip to content

Support customizable POETRY_HOME #775

Closed

Description

@dcramer

It would be nice to define where poetry gets installed (via get-poetry.py).

By reading the docstring I had assumed it would work in $POETRY_HOME, but that was quickly disproven.

Ideally this could be defined via an environment variable (POETRY_HOME) or via a flag to get-poetry.py.

Activity

  1. dcramer commented on Jan 4, 2019

    @dcramer
    ContributorAuthor

    Aside, this is to make things like Travis and Docker easier to configure without a lot of custom code in each. Example of me continually guessing and messing this up is available here:

    getsentry/zeus#166

    Hopefully by the time you've read this I have it all functional ;)

  2. dmfigol commented on Jan 11, 2019

    @dmfigol

    Yes, please. I need to run my docker app as non-root, while all packages are installed as root. Poetry is getting installed in /root/.poetry and then a non-root user can't use it.

  3. floer32 commented on Apr 4, 2019

    @floer32

    My preferred option for workaround (in case someone drops by here, who cannot wait for #794 to be merged)

    given you already have get-poetry.py somewhere... and given sed is OK (this one should work fine on most Linux and Macs)

    export get_poetry="/path/to/get/poetry"
    python <( sed 's/^POETRY_HOME.*=.*/POETRY_HOME = os.environ.get("POETRY_HOME") or os.path.join(HOME, ".poetry")/' "$poetry_installer" )

    Note you could of course do manual equivalent (editing by hand). or you could do a hack of temporarily overriding HOME. I am partial to the sed way above because it seems fairly compatible, and doesn't involve hidden knowledge of a manual (or one-time-then-committed) patch to the file.

  4. kasteph commented on Oct 10, 2019

    @kasteph
    Member

    #794 closes this issue.

  5. github-actions commented on Mar 3, 2024

    @github-actions

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

  6. locked as resolved and limited conversation to collaborators on Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureFeature requests/implementations

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions