Wheel files : What is the meaning of "none-any" in protobuf-3.4.0-py2.py3-none-any.whl
Asked Answered
G

2

32

I used pip to get .whl file for numpy

pip wheel --wheel-dir=./ numpy

and I have got numpy-1.13.3-cp27-cp27mu-linux_armv7l.whl because I am using ARM platform, but when run pip for protobuf

pip wheel --wheel-dir=./ protobuf

I got protobuf-3.4.0-py2.py3-none-any.whl

So, why isn't linux_armv7l like the case of numpy, I didn't alter the machine and searched for that difference but no information.

thanks for advice .

Gog answered 24/10, 2017 at 15:58 Comment(1)
See also: https://mcmap.net/q/454327/-how-do-i-upload-a-universal-python-wheel-for-python-2-and-3/1959808 for creating "universal" wheels (python3 setup.py bdist_wheel creates a py3 wheel by default. python3 setup.py bdist_wheel --universal creates a py2.py3 wheel, if possible).Stereography
G
50

Let's split package names by components:

  • numpy — package name
  • 1.13.3 — package version
  • cp27 — the package was compiled to be used with this version of Python
  • cp27mu — compilation flags
  • linux — operating system
  • armv7l — processor architecture

This means that package numpy contains binary extensions written in C and compiled for specific processor, OS and Python version.

The following package is pure Python:

  • protobuf — name
  • 3.4.0 — version
  • py2.py3 — the package is written in highly portable manner and is suitable for both major versions of Python
  • none — is not OS-specific
  • any — suitable to run on any processor architecture
Guimond answered 24/10, 2017 at 16:21 Comment(4)
Thanks for your detailed answer, but can I get .whl file of protobuf and specific for particular architecture like ARM7l ? , or that depending on the remote repo. for that package ?Gog
Yes, that depends on what the author publishes. Google provides binaries only for 64-bit Linux on amd/intel processors. For the rest pip downloads the portable package and compiles from sources.Guimond
This is partly wrong, the other answer by wolfhong (https://mcmap.net/q/447491/-wheel-files-what-is-the-meaning-of-quot-none-any-quot-in-protobuf-3-4-0-py2-py3-none-any-whl) is more correct.Fonsie
In particular, "none" in the second wheel name is the abi tag, while "any" is the platform (OS + arch) tag - the corresponding values from the 2 examples are actually cp27 <-> py2.py3, cp27mu <-> none and linux_armv7 <-> anyFonsie
C
20

The wheel filename is {distribution}-{version}(-{build tag})?-{python tag}-{abi tag}-{platform tag}.whl.

distribution

Distribution name, e.g. 'django', 'pyramid'.

version

Distribution version, e.g. 1.0.

build tag

Optional build number. Must start with a digit. A tie breaker if two wheels have the same version. Sort as the empty string if unspecified, else sort the initial digits as a number, and the remainder lexicographically.

language implementation and version tag

E.g. 'py27', 'py2', 'py3'.

abi tag

E.g. 'cp33m', 'abi3', 'none'.

platform tag

E.g. 'linux_x86_64', 'any'.

reference is here.

Capias answered 6/6, 2018 at 3:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.