For a new version of my YAML Macros package, I’m looking to use ruamel.yaml instead of pyyaml (because pyyaml lacks ruamel’s round-trip capability). Rather than bundling ruamel.yaml with YAML Macros, I’d like to add it as a dependency.
My best understanding is that the structure of the ruamel.yaml dependency should look basically like this:
ruamel/
st3/
yaml/
<ruamel.yaml contents here, including __init__.py>
However, the python files that comprise ruamel.yaml all import ruamel.yaml.<thing>
. As a result, when using the above structure my own YAML Macros package can try to import ruamel.yaml.<thing>
, but the ruamel.yaml package itself can’t resolve its own imports.
I realize that I could rectify this problem by rewriting the imports in the ruamel.yaml package, but I’m hoping that there is a less drastic solution that doesn’t complicate updating the ruamel.yaml version.