assuming dependencies such as the following:
[tool.poetry.dependencies]
mydep = { path = "../mydep/", develop = false }
when you create wheels with poetry from projects using relative path dependencies, those path
dependencies are persisted into the wheels METADATA
file as follows:
Requires-Dist: mydep @ ../mydep
this script iterates through wheel files in ../dist
and updates the line to be
Requires-Dist: mydep
meaning that ../dist
can be used as a wheelhouse directory when making installs inside docker
containers or generating pex
files.
poetry workspace run -- poetry build --format=wheel
mv packages/*/dist/*.whl dist
python tools/fix_poetry_wheels.py
pex \
--find-links=dist \
--script=gunicorn \
--output-file=myapp.pex \
myapp
This code is licensed under the [MIT licence][mit_licence].