Skip to content

Commit 545b825

Browse files
committed
Avoid initializing C API in freeze_modules
1 parent afc6c0a commit 545b825

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

graalpython/com.oracle.graal.python.frozen/freeze_modules.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"""
88

99
from collections import namedtuple
10-
import hashlib
1110
import marshal
1211
import ntpath
1312
import os
@@ -16,6 +15,9 @@
1615
import textwrap
1716
import shutil
1817

18+
from _sha256 import sha256
19+
20+
1921
FROZEN_ONLY = os.path.join(os.path.dirname(__file__), "flag.py")
2022

2123
# These are modules that get frozen.
@@ -369,7 +371,7 @@ def _iter_sources(modules):
369371
def _get_checksum(filename):
370372
with open(filename, "rb") as infile:
371373
contents = infile.read()
372-
m = hashlib.sha256()
374+
m = sha256()
373375
m.update(contents)
374376
return m.hexdigest()
375377

0 commit comments

Comments
 (0)