-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 pyproject.toml #834
base: main
Are you sure you want to change the base?
Conversation
It would be good to add a test case for a pyproject.toml using setuptools as the build backend end.
Update: done (f845208) |
9011377
to
f845208
Compare
f845208
to
6235861
Compare
6235861
to
524f2c7
Compare
Rebased onto master (
|
524f2c7
to
84534a0
Compare
Rebased onto master (af860be) |
84534a0
to
b8ed157
Compare
Rebased onto master (93a620e) |
Add two test cases for projects using poetry as the build backend: - testPoetry: project without dependencies - testPoetryLock: project with dependencies, using a poetry.lock file
Add two test cases for projects using flit as the build backend: - testFlit: project without dependencies - testFlitRequires: project with dependencies
b8ed157
to
42c45ee
Compare
Hi guys! Could you please add a comment on status of this and #796 Support for Poetry? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Sorry for the delay in replying here. We're in the process of moving to Cloud Native Buildpacks, so all development effort is focused there at the moment, and eventually they will replace the current buildpacks. As such, we're only making minimal changes to the current buildpacks for now.
If you'd like to follow along with the development, our new CNB framework is here (which is now mostly complete):
https://github.com/heroku/libcnb.rs
And the Python CNB will (once it's beyond a local prototype), live here:
https://github.com/heroku/buildpacks-python
(My work in progress CNB has handling for pyproject.toml
if it's any consolation!)
For more about CNBs, see:
https://buildpacks.io/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @cjolowicz, thanks for the contribution. Let's try to push this over the finish line. I'd really love to use the modern project setup on Heroku.
The only thing needed to make this work, is the change in bin/detect
.
Took make things easier for the maintainers, I'd suggest dropping all other changes.
I'd also recommend updating the README file. It should probably mention pyproject.toml
support.
if [ ! -f requirements.txt ] && [ ! -f Pipfile ] ; then | ||
if [ -f pyproject.toml ] ; then | ||
# Editable installs are not supported for pyproject.toml-style projects. | ||
echo "." > requirements.txt | ||
else | ||
echo "-e ." > requirements.txt | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this change is needed. Editable installations are supported.
For everyone who needs a quick fix:You can either add an empty |
Support PEP 517 package builds using the
pyproject.toml
file. This adds support for build backends other than setuptools, such as poetry and flit. This PR is a follow-up to #833.There is not much to do here, because pip 19 already implements PEP 517-based builds.
Note that while this PR does allow deploying poetry-based projects to Heroku, it does not use the pinned requirements from the
poetry.lock
file. Implementing support for poetry.lock is build backend-specific, and therefore left to be addressed by a follow-up PR.See #796
Follow-ups:
CI is broken for PRs from another repository, see this comment. Please check the corresponding PR in my fork to verify CI: