Credits to this post
Assume this is our project.
code/ # Repo root
mypkg/ # Package
__init__.py
_version.py
meta.json
setup.py
If you are here you probably know that you can't directly import __version__
into setup.py
. It will raise an error.
To prevent that, we will take some metadata from setup.py and put it into meta.json
That will allow to safely share data between package and setup.py
because any dependency code won't be executed.