Move to implicit namespace packages for CoreTools
- Dominant language
- Python
- Stars
- 14
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
Right now we use the legacy way of declaring a `namespace` package with all participating distributions having the same prefix folder and all including the same `__init__.py` file in that folder that uses `pkg_util` to declare the package as a namespace package. See:
https://github.com/iotile/coretools/blob/master/iotilecore/iotile/__init__.py#L2
However, on python 3, you can use "Implicit Namespace Packages" from PEP 420:
https://www.python.org/dev/peps/pep-0420/#packaging-implications
The upside of implicit namespace packages is that there is no file that is included in multiple distributions. This is important when packaging up distributions to install via a package manager like `apt` or in `yocto`. The package managers don't like it when a single file is written to by multiple packages.
To be more compatible with package managers we should move `CoreTools` to implicit namespace packages now that we are python 3 only anyways. The only advantage of the old way was that it worked on python 2.
Contributor guide
Assessment
This issue has not been assessed yet.