Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin system for tags #161

Open
dholth opened this issue May 29, 2019 · 3 comments
Open

plugin system for tags #161

dholth opened this issue May 29, 2019 · 3 comments

Comments

@dholth
Copy link
Member

dholth commented May 29, 2019

According to PEP 425, "tools should use the most-preferred architecture dependent tag e.g. cp33-cp33m-win32 or the most-preferred pure python tag e.g. py33-none-any by default."

If we can get those tools to import the same list of tags then bdist_wheel would give all new wheels with C extensions the tag tags[0] and pip would install them.

We could give packaging.tags a config Python script that could change the list of tags. Then BSD users (who have said the default tag is not useful for them) or cluster users could use appropriate tags without having to pass special arguments to every invocation of install or build tools. This would remove the need for a global standard or a separate "no manylinux" config.

For example try: import _filter_tags; tags = _filter_tags.filter(default_tags), or check a config file for the import if that's not too strange a beast. By accepting a list of tags from packaging.tags a filter could change the list of tags without having to necessarily generate them all itself.

@cjerdonek I'm not thrilled with this example of a plugin system

@brettcannon
Copy link
Member

Do note that with #231 that various functions will be exposed which might help make it easier to control things.

@zooba
Copy link

zooba commented Nov 25, 2019

Could this be as simple as a tags.ini in some well-known (sys.prefix?) location that just inserts any tags ahead of what sys_tags returns? (As in, sys_tags finds and yields those tags first, then goes on to its normal behaviour.)

I think we want it in here so that build tools and install tools that share packaging can pick up the same tag without (tools or users) having to do extra work.

@dstufft
Copy link
Member

dstufft commented Nov 25, 2019

An interface to control tags like that, whether it's some kind of text file or a python API should be a PEP so we don't privilege this particular implementation of tagging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants