File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 70
70
"version" : platform .mac_ver ()[0 ],
71
71
}
72
72
elif sys .platform == "win32" :
73
+ _ver = sys .getwindowsversion ()
73
74
_METADATA ["os" ] = {
74
- "type" : platform . system () ,
75
- # "Windows XP", "Windows 7", "Windows 10", etc.
76
- "name" : " " . join (( platform . system (), platform . release ())),
77
- "architecture" : platform .machine (),
78
- # Windows patch level (e.g. 5.1.2600-SP3)
79
- "version" : "- " .join (platform . win32_ver ()[ 1 :3 ]),
75
+ "type" : "Windows" ,
76
+ "name" : "Windows" ,
77
+ # Avoid using platform calls, see PYTHON-4455.
78
+ "architecture" : os . environ . get ( "PROCESSOR_ARCHITECTURE" ) or platform .machine (),
79
+ # Windows patch level (e.g. 10.0.17763-SP0).
80
+ "version" : ". " .join (map ( str , _ver [ :3 ])) + f"-SP { _ver [ - 1 ] or '0' } " ,
80
81
}
81
82
elif sys .platform .startswith ("java" ):
82
83
_name , _ver , _arch = platform .java_ver ()[- 1 ]
You can’t perform that action at this time.
0 commit comments