Adding local libraries #5
Unanswered
briantwatson
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Thanks for putting this together and sharing, it's been a helpful reference.
I've been using it alongside this blog post as inspiration to restructure our repo as our projects grow.
I was wondering if you could elaborate on how you're adding local libraries to a project in the
stack
folder. Are you manually editing the pyproject.toml after adding viapoetry add ../../libs...
?I see you have an entry with empty quotes under
[tool.poetry.dependencies]
followed by the entry again under[tool.poetry.dev-dependencies]
with the path anddevelop = true
One of things I've been wrestling with in our approach is how to cleanly set up docker builds for services. In initial testing I'm simply adding local libs to a project via
poetry add ../../libs/<lib name>
and that drops the entry into[tool.poetry.dependencies]
(w/odevelop = true
) and works fine for development, but attempting to build an image using the wheels as you've laid out fails with aip._vendor.packaging.requirements.InvalidRequirement: Invalid URL: ../../libs...
error, which I presume is due to[tool.poetry.dependencies]
reference in the service wheel that's built.Looking at your setup, if I'm following correctly, you've got the lib reference in the dev dependencies so the pip install of the "service" wheel won't pick that up, but your makefile finds it in the pyproject.toml given the path match and creates a wheel for install. Am I following correctly? Was this a manual workaround?
Thanks again!
Beta Was this translation helpful? Give feedback.
All reactions