You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.
Right now the environment markers defined in pep508 do not allow a way for specifying a requirement that is exclusively for 64 bit or 32 bit windows. The listed environment markers from: https://peps.python.org/pep-0508/#environment-markers all return identical data based on the OS install and not the current python environment. For example running on a 64bit and 32 bit build of python on the same 64bit windows system will yield:
Python API for marker
32bit Python output
64 bit Python output
os.name
'nt'
'nt'
sys.platform
win32
win32
platform.machine()
'AMD64'
'AMD64'
platform.system()
'Windows'
'Windows'
It would be good if the platform markers offered a way to enable distinguishing between 32bit and 64bit python builds on a 64bit os (I'm assuming platform_machine works on a 32bit version of windows, but I don't have an install to test locally).
The first one that comes to mind would be platform_architecture to mirror platform.architecture() which returns (bits, linkage). Then for the marker we could match on string outputs like 64bit_WindowsPE for 64bit builds and 32bit_WindowsPE for 32 bit builds.
The text was updated successfully, but these errors were encountered:
mtreinish
changed the title
Add environment marker to distniguish 32bit and 64bit windows
Add environment marker to distinguish 32bit and 64bit windows
Jul 11, 2022
The use case is pretty straightforward if there is a compiled extension that has wheels only for 64 bit windows and an sdist published. Without having an environment marker the sdist will match and require 32 bit users to try and build it from source.
Personally I'm hitting this trying to add a requirement on symengine where there are no 32 bit wheels published and building from source is difficult and most users won't have the dependencies installed. On Linux it's trivial to use environment markers to restrict the requirement to x86_64 (or other supported architectures) and avoid it trying to build from source.
Right now the environment markers defined in pep508 do not allow a way for specifying a requirement that is exclusively for 64 bit or 32 bit windows. The listed environment markers from: https://peps.python.org/pep-0508/#environment-markers all return identical data based on the OS install and not the current python environment. For example running on a 64bit and 32 bit build of python on the same 64bit windows system will yield:
os.name
'nt'
'nt'
sys.platform
win32
win32
platform.machine()
platform.system()
It would be good if the platform markers offered a way to enable distinguishing between 32bit and 64bit python builds on a 64bit os (I'm assuming
platform_machine
works on a 32bit version of windows, but I don't have an install to test locally).The first one that comes to mind would be
platform_architecture
to mirrorplatform.architecture()
which returns(bits, linkage)
. Then for the marker we could match on string outputs like64bit_WindowsPE
for 64bit builds and32bit_WindowsPE
for 32 bit builds.The text was updated successfully, but these errors were encountered: