unified-font-object / ufoNormalizer

A tool that will normalize the XML and other data inside of a UFO.
Other
51 stars 19 forks source link

Installing to /usr/lib/python3.9/site-packages/_version.py #78

Closed tjbp closed 3 years ago

tjbp commented 3 years ago

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?

anthrotype commented 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

justvanrossum commented 3 years ago

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.)

anthrotype commented 3 years ago

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)

josh-hadley commented 3 years ago

Seems like the package route should be fine. Since I broke this, I'll fix it with that approach, unless there are objections...