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

Use pyproject.toml instead of requirements.txt #1210

Closed
bolinocroustibat opened this issue May 24, 2021 · 5 comments
Closed

Use pyproject.toml instead of requirements.txt #1210

bolinocroustibat opened this issue May 24, 2021 · 5 comments

Comments

@bolinocroustibat
Copy link

bolinocroustibat commented May 24, 2021

Could it use the now standard PEP 518 / PEP 621 pyproject.toml by default, and fallback to requirements.txt if not present?

AFAIK pip install pyproject.toml instead of pip install -r requirements.txt is now fully supported by pip.

(I know there is a Poetry buildpack, but since pyproject.toml is the new standard, I don't think it should be related to Poetry, neither export to old requirements.txt like the Poetry buildpack does)

@edmorley
Copy link
Member

@bolinocroustibat Hi! I can't wait until things are more standardised around pyproject.toml, however pip doesn't yet support installing dependencies based on the contents of pyproject.toml:
https://pip.pypa.io/en/stable/search/?q=pyproject.toml

The recent changes in pip use pyproject.toml to determine what build backed (eg setuptools) to install to build packages from source (ie packages that don't yet have a wheel), per PEP518:
https://www.python.org/dev/peps/pep-0518/#rationale

There are discussions about using pyproject.toml to specify what package installer/"frontend" to use, however it's in draft status (and also doesn't replace the requirements list, only simplifies determining what tool to run):
https://discuss.python.org/t/pep-650-specifying-installer-requirements-for-python-projects/6657
https://www.python.org/dev/peps/pep-0650/

I'll close this out for now pending future PEPs and pip support (also by the time that happens, we'll have likely migrated from this classic Heroku buildpack API v2 buildpack, to the new Cloud Native Buildpacks in another repo).

@baggiponte
Copy link

Hello! So the only way to deploy apps developed with tools like pdm on heroku is still to export the dependencies to requirements.txt, am I right? Thanks!

@edmorley
Copy link
Member

@baggiponte Hi! The suggested approaches in #1341 (comment) are still the best way to use PDM.

@baggiponte
Copy link

thank you for the reply! (Also, where can I find updates for the current status of the cloud native buildpack implementation?)

@edmorley
Copy link
Member

The CNB is being developed here:
https://github.com/heroku/buildpacks-python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants