heroku / heroku/heroku-buildpack-python

Add support for configuring Poetry via env vars (`POETRY_*`)

Open
#1,700 3 comments 1 reaction 1 assignee Claimed by @edmorley View on GitHub
enhancement
Dominant language
Ruby
Stars
993
Forks
1.8k
Avg merge
10h 50m
Merged PRs (30d)
10

Description

I have several applications that use poetry and several of the packages in each app need to be installed via a private repository. Previously I was able to install these in my apps using a requirements.txt that installed poetry, then a post_compile script that set poetry config vars for http basic sign-in to our private repository before calling poetry install.

With the new buildpack updates that allow poetry to be used out of the box, I'm struggling to figure out how to correctly pass my private repository user/password since I can no longer call my config command directly before `poetry install` is called (I don't think pre_compile will work here since poetry needs to be installed first). According to poetry I could use a config.toml file, but since one of the vars is a pw I don't want to expose that. Another option via poetry is that I should be able to set ENV vars to replace the config command that I used to call before running poetry install ([poetry doc here](https://python-poetry.org/docs/configuration/#http-basicnameusernamepassword)) but poetry in Heroku does not seem to be picking up on my POETRY_ env vars, even though from what I can tell, it should be passing them... Previously with the post_compile config command I was setting the user/pass also with env vars (ex: `poetry config http-basic.my-pypi "$PYPI_USERNAME" "$PYPI_PASSWORD"`) and it was working fine.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.