File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -262,6 +262,13 @@ mod sys {
262
262
version:: get_version ( )
263
263
}
264
264
265
+ #[ cfg( windows) ]
266
+ #[ pyattr]
267
+ fn winver ( _vm : & VirtualMachine ) -> String {
268
+ // Note: This is Python DLL version in CPython, but we arbitrary fill it for compatibility
269
+ version:: get_winver_number ( )
270
+ }
271
+
265
272
#[ pyattr]
266
273
fn _xoptions ( vm : & VirtualMachine ) -> PyDictRef {
267
274
let ctx = & vm. ctx ;
Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ pub fn get_version_number() -> String {
28
28
format ! ( "{MAJOR}.{MINOR}.{MICRO}{RELEASELEVEL}" )
29
29
}
30
30
31
+ pub fn get_winver_number ( ) -> String {
32
+ format ! ( "{MAJOR}.{MINOR}" )
33
+ }
34
+
31
35
pub fn get_compiler ( ) -> String {
32
36
format ! ( "rustc {}" , env!( "RUSTC_VERSION" ) )
33
37
}
You can’t perform that action at this time.
0 commit comments