deploy-ng: Support pktutil.get_data() on Python 3

Python 2 should already work.
This commit is contained in:
Mitchell Stokes 2018-06-25 18:13:56 -07:00
parent 0253a7a29f
commit ffe776b8f9
1 changed files with 5 additions and 0 deletions

View File

@ -128,7 +128,12 @@ def find_spec(fullname, path=None, target=None):
spec.origin = sys.executable
return spec
def get_data(path):
with open(path, 'rb') as fp:
return fp.read()
FrozenImporter.find_spec = find_spec
FrozenImporter.get_data = get_data
# Set the TCL_LIBRARY directory to the location of the Tcl/Tk/Tix files.
import os