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

please post an official list of platform_machine supported names #255

Closed
zzzeek opened this issue Aug 11, 2021 · 5 comments
Closed

please post an official list of platform_machine supported names #255

zzzeek opened this issue Aug 11, 2021 · 5 comments
Labels

Comments

@zzzeek
Copy link

zzzeek commented Aug 11, 2021

in SQLAlchemy, we have greenlet as a dependency, and we are getting a few complaints for those folks where their platform deos not support greenlet.

to that end, we are currently going to add this qualifier to our requirements:

install_requires =
    greenlet != 0.4.17;python_version>="3" and platform_machine not in 'ia64 hppa parisc'

the "platform_machine" variable is what we get from:

$ python -c "import platform; print(platform.machine())"
x86_64

What would be best would be an official list of platforms that are currently supported so that we don't have to guess here. I poked around greenlet's source to see https://github.com/python-greenlet/greenlet/tree/master/src/greenlet/platform, but those are just filenames and it doesnt seem like I can extract full "platform.machine()" names from it. Mostly I would need a list of exact platform.machine() names.

references sqlalchemy/sqlalchemy#6136

@jamadden
Copy link
Contributor

Unfortunately, it's more than what platform.machine() can give you. It also depends on the compiler in use and even certain ABI settings of the target; greenlet has to know about the intersection of the architecture and compiler. (See e.g., #118 and #66.)

I could publish a list, but it would essentially just be the contents of https://github.com/python-greenlet/greenlet/blob/master/src/greenlet/slp_platformselect.h That's probably not helpful…?

As far as what's "supported": I only consider a target truly supported if there is CI that runs it (other platforms are great and i'm happy to include them but I can't claim to support them). That limits it to MSVC on 32/64-bit Windows, aarch64 linux with GCC, ppc64le linux with GCC, x86_64 linux with GCC (all with whatever version of the compiler comes in the manylinux images), and x86_64 macOS with Apple's clang.

@zzzeek
Copy link
Author

zzzeek commented Aug 11, 2021

OK so let me alter what I could use. Mostly, we need an "include" list of "pretty much always supported" machine names, which would be those platforms where we go ahead and require greenlet by default, even if the user hasn't stated any preference. if there are machine names that might be supported or not based on compiler stuff, they by default would not get greenlet but they can on our end specify an install "extra" target [asyncio] which will then force greenlet to install.

So looking at your pypi I could just go with that list of machine names as that's where this will be an "easy" install for people.

@jamadden
Copy link
Contributor

That seems reasonable to me.

@zzzeek
Copy link
Author

zzzeek commented Aug 11, 2021

right so looking at pypi, the list of machines is:

 x86_64 aarch64 ppc64le amd64 win32

now you obviously compile and run on more platforms than that. however, those are the platforms for which someone will have a pre-built wheel already for them without the need for compiler tools to be installed. So I propose I limit my "default" install to those above only, and if they are on like i386 or something and want to run asyncio (which would be pretty odd :) ) they can install the "asyncio" extra explicitly.

@zzzeek
Copy link
Author

zzzeek commented Aug 11, 2021

OK naturally it would be nice if greenlet had a doc regarding this but I hate when people do that to me so we can consider this done , and if you want to add a doc note great, otherwise enjoy your day :)

@zzzeek zzzeek closed this as completed Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants