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.
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:
https://github.com/getsentry/zeus/pull/166
Hopefully by the time you've read this I have it all functional ;)
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.
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.
Most helpful comment
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.pysomewhere... and given sed is OK (this one should work fine on most Linux and Macs)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 thesedway above because it seems fairly compatible, and doesn't involve hidden knowledge of a manual (or one-time-then-committed) patch to the file.