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

Support customizable POETRY_HOME #775

Closed
dcramer opened this issue Jan 4, 2019 · 5 comments
Closed

Support customizable POETRY_HOME #775

dcramer opened this issue Jan 4, 2019 · 5 comments
Labels
kind/feature Feature requests/implementations

Comments

@dcramer
Copy link
Contributor

dcramer commented Jan 4, 2019

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.

@dcramer
Copy link
Contributor Author

dcramer commented Jan 4, 2019

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

@dmfigol
Copy link

dmfigol commented Jan 11, 2019

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.

@floer32
Copy link

floer32 commented Apr 4, 2019

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.

@kasteph kasteph added the kind/feature Feature requests/implementations label Oct 10, 2019
@kasteph
Copy link
Member

kasteph commented Oct 10, 2019

#794 closes this issue.

@kasteph kasteph closed this as completed Oct 10, 2019
Copy link

github-actions bot commented Mar 3, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations
Projects
None yet
Development

No branches or pull requests

4 participants