heroku-buildpack-python
heroku-buildpack-python copied to clipboard
Support pyproject.toml
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.
- Detect Python projects having only pyproject.toml and no requirements.txt or Pipfile.
- Avoid editable installs, which are not compatible with pyproject.toml-style projects.
- Add test cases for pyproject.toml-style projects managed by setuptools, poetry, and flit.
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:
- #835 (Support poetry.lock)
CI is broken for PRs from another repository, see this comment. Please check the corresponding PR in my fork to verify CI:
- cjolowicz/heroku-buildpack-python#14
It would be good to add a test case for a pyproject.toml using setuptools as the build backend end.
~There could be a problem here because the buildpack uses a vendorized setuptools pinned at 39.0.1.~ On second thoughts, this should be fine because pip will use an isolated build using the setuptools version specified in the pyproject.toml.
Update: done (f845208)
Rebased onto master (af860be62afc610aa24e6a1556ab21279d3f5d0b)
Rebased onto master (93a620e6edacde750d32af6e3c8c3ad5e6800a40)
Hi guys! Could you please add a comment on status of this and #796 Support for Poetry?
For everyone who needs a quick fix:
You can either add an empty setup.py file to your project or a requirements.txt file with a dot (.) in it.