Export a Poetry project's poetry.lock
to a pip-compliant requirements.txt
with a pre-commit hook.
To your .pre-commit-config.yaml add:
- repo: https://github.com/seandstewart/pre-commit-poetry-export
rev: master
hooks:
- id: export-requirements
- id: export-requirements-dev
This will export two files: requirements.txt
, with only the main dependencies, and requirements-dev.txt
with the dev dependencies included.