Closed tjbp closed 3 years ago
You're right. If you want to have setuotools_scm write out the version file, you have to turn the module into a package and write the version inside the package directory, otherwise it will pollute the global site-packages.
/cc @josh-hadley
Alternatively, one could name the version file ufonormalizer_version.py
. (Not pretty, but may be an option if turning ufonormalizer into a package is undesirable for some reason.)
i don't see any reason why it would be undersirable to turn ufonormalizer into a package. The whole content of the current module would be moved to the __init__.py
, and import would work the same way as before.
There's also the option of not writing the _version.py
, which means to get the __version__
one would need to use importlib-metadata or pkg_resources (https://github.com/pypa/setuptools_scm#retrieving-package-version-at-runtime)
Seems like the package route should be fine. Since I broke this, I'll fix it with that approach, unless there are objections...
The latest release should install _version.py into the project's namespace - it's obviously far too generic to be at the site-packages level, but I think this is accidental?