Skip to content

feat: rewrite top namespaces for relative includes when building packages

Compare
Choose a tag to compare
@DavidVujic DavidVujic released this 13 Feb 19:11
· 30 commits to main since this release
6cf7397

Supporting the use case for publishing PyPI package(s) from a Python Monorepo arranged according to what's suggested in this repo, and with Polylith.

When projects includes shared packages, they will have the same top namespace. This can be a problem when libraries, that originates from projects built from the same monorepo, will be installed into the same virtual environment.

Since Python libraries are installed in a "flat" folder structure, two libraries with the same top namespace will collide.

This release will offer a solution to this, by choosing a custom namespace to be used in the build process. Then organize the namespaced packages, and more importantly, re-write the imports made in the source code.

Pull Request