Skip to content

Commit 33b8830

Browse files
committed
[GR-17152] Added hexversion to sys module
PullRequest: graalpython/586
2 parents 5f318a2 + f14e0e8 commit 33b8830

File tree

1 file changed

+6
-1
lines changed
  • graalpython/lib-graalpython

1 file changed

+6
-1
lines changed

graalpython/lib-graalpython/sys.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2019, 2019, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
22
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33
#
44
# The Universal Permissive License (UPL), Version 1.0
@@ -52,6 +52,11 @@ def make_implementation_info():
5252
del make_implementation_info
5353
del __gmultiarch
5454
version_info = implementation.version
55+
hexversion = ((version_info.major << 24) |
56+
(version_info.minor << 16) |
57+
(version_info.micro << 8) |
58+
(0xa << 4) | # 0xA is alpha, 0xB is beta, 0xC is rc, 0xF is final
59+
(version_info.serial << 0))
5560

5661

5762
def make_flags_class():

0 commit comments

Comments
 (0)