distutils icon indicating copy to clipboard operation
distutils copied to clipboard

Use the ecosystem convention for naming directories

Open kmod opened this issue 2 years ago • 2 comments

https://github.com/pypa/distutils/pull/133 was recently merged, and it's great to see better support for alternative Python implementations, but unfortunately it was implemented in a way that is distinct from what I've seen in the rest of the community.

In particular the issue is the usage of sys.cache_tag for naming implementation directories. This works but is a deviation from the community norm of using sysconfig.get_config_var("VERSION"): for example see build_scripts.py from this repo and the uwsgi build system. This is workable for an alternative implementation as long as we set sys.cache_tag = sysconfig.get_config_var("VERSION"), which I guess isn't the end of the world, but I believe the correct resolution is to use the appropriate configuration flag.

I'd like to advocate for #107 being merged, which simply means replacing sys.cache_tag with sysconfig.get_config_var("VERSION") in #133.

kmod avatar May 10 '22 17:05 kmod

Unfortunately, I don't have a strong opinion on the right thing to do here.

@mgorny Do you have an opinion on kmod's proposal?

jaraco avatar Jun 06 '22 00:06 jaraco

I don't think that this is going to work.

$ python3.9 -c 'import sysconfig; print(sysconfig.get_config_var("VERSION"))'
3.9
$ pypy3.9 -c 'import sysconfig; print(sysconfig.get_config_var("VERSION"))'
3.9

Unlike #133, it doesn't give unique directories for alternate interpreters.

mgorny avatar Jun 06 '22 04:06 mgorny