Skip to content

Commit b0c5a69

Browse files
author
lidong
committed
fix get_data __name__
1 parent de566cb commit b0c5a69

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

zipapps/main.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from pkgutil import get_data
1616
from zipfile import ZIP_DEFLATED, ZIP_STORED, BadZipFile, ZipFile
1717

18-
__version__ = '2023.09.12'
18+
__version__ = '2024.04.22'
1919

2020

2121
def get_pip_main(ensurepip_root=None):
@@ -402,14 +402,14 @@ def make_runner():
402402
}
403403
for k, v in self.ENV_ALIAS.items():
404404
kwargs[f'{k}_env'] = repr(v)
405-
code = get_data('zipapps', 'entry_point.py.template').decode('u8')
405+
code = get_data(__name__, 'entry_point.py.template').decode('u8')
406406
(self._cache_path / '__main__.py').write_text(code.format(**kwargs))
407407

408-
code = get_data('zipapps', 'ensure_zipapps.py.template').decode('u8')
408+
code = get_data(__name__, 'ensure_zipapps.py.template').decode('u8')
409409
(self._cache_path / 'ensure_zipapps.py').write_text(
410410
code.format(**kwargs))
411411

412-
code = get_data('zipapps', 'activate_zipapps.py').decode('u8')
412+
code = get_data(__name__, 'activate_zipapps.py').decode('u8')
413413
(self._cache_path / 'activate_zipapps.py').write_text(code)
414414
code += '\n\nactivate()'
415415

0 commit comments

Comments
 (0)