Impossible to get arch Python native package compiled with via Wheel API
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pkginfo |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
pkginfo 1.9.6
Debian 11
python 3.9
pip 23.0.1
I need to get architecture of a not yet installed native Python package.
I have only *.whl file for this package (arbitrary).
I can't find any way to get architecture from metadata.
Example (python-ldap choosen randomly, but it has native code):
Do:
python3 -m pip download --no-clean --no-deps --no-binary :all: -d . -i https:/
tar -zxf ./python-
cd python-ldap-3.4.3/
python3 -m pip wheel . --python python3 --wheel-dir ../fpm-wheel --no-input --disable-
Then in python3 console:
from pkginfo import Wheel
wf = Wheel("
for key in iter(wf):
print(key, '=', getattr(wf, key))
You;ll get something like this:
>>> for key in iter(wf):
... print(key, '=', getattr(wf, key))
...
metadata_version = 2.1
name = python-ldap
version = 3.4.3
platforms = ()
supported_platforms = ()
summary = Python modules for implementing LDAP clients
description = python-ldap:
......
keywords = None
home_page = https:/
author = python-ldap project
author_email = <email address hidden>
license = Python style
classifiers = [.......]
download_url = https:/
requires = ()
provides = ()
obsoletes = ()
maintainer = None
maintainer_email = None
requires_python = >=3.6
requires_external = ()
requires_dist = ['pyasn1 (>=0.3.7)', 'pyasn1-modules (>=0.1.5)']
provides_dist = ()
obsoletes_dist = ()
project_urls = ()
provides_extras = ()
description_
And there is no architecture...
Previously, on pre-project.toml era, it was possible to get required data via distutils with something like this:
self.distributi
Now, when almost all popular packages use project.toml instead of setup.py, is it possible to get package architecture (or just to tell if it native or pure) by looking on it's *.whl file?
BTW: required information IS available in result *.whl:
python_ ldap-3. 4.3.dist- info/WHEEL:
Wheel-Version: 1.0 linux_x86_ 64
Generator: bdist_wheel (0.40.0)
Root-Is-Purelib: false
Tag: cp39-cp39-
Root-Is-Purelib: false is what is needed.
Is it possible to get it from code, not by eyeballing?