py2nativepro 0.1.1__cp313-abi3-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
py2nativepro/__init__.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import importlib.util
|
|
3
|
+
import importlib.machinery
|
|
4
|
+
_PYD_NAME = 'py2nativepro.pyd'
|
|
5
|
+
_MODULE_NAMES = ['py2nativepro.decodekey', 'py2nativepro.jwt_es256', 'py2nativepro.keygen', 'py2nativepro.license', 'py2nativepro.main', 'py2nativepro.protemplate', 'py2nativepro.sign', '_p2n_shared', 'cython_runtime']
|
|
6
|
+
class _BundledFinder:
|
|
7
|
+
def find_spec(self, fullname, path, target=None):
|
|
8
|
+
if fullname in _MODULE_NAMES:
|
|
9
|
+
loader = importlib.machinery.ExtensionFileLoader(fullname, __path__[0] + '/' + _PYD_NAME)
|
|
10
|
+
return importlib.util.spec_from_loader(fullname, loader)
|
|
11
|
+
return None
|
|
12
|
+
sys.meta_path.insert(0, _BundledFinder())
|
|
13
|
+
# Pre-create 'main' in sys.modules so that imports of
|
|
14
|
+
# 'main.shared' during PyInit_main can find the parent.
|
|
15
|
+
import types
|
|
16
|
+
_main_placeholder = types.ModuleType('main')
|
|
17
|
+
_main_placeholder.__path__ = []
|
|
18
|
+
_main_placeholder.__package__ = 'main'
|
|
19
|
+
sys.modules['main'] = _main_placeholder
|
|
20
|
+
import importlib as _importlib
|
|
21
|
+
# Pre-create cython_runtime in sys.modules so that
|
|
22
|
+
# PyImport_AddModule('cython_runtime') inside the .so's init
|
|
23
|
+
# functions finds it without triggering a recursive load.
|
|
24
|
+
if 'cython_runtime' not in sys.modules:
|
|
25
|
+
sys.modules['cython_runtime'] = types.ModuleType('cython_runtime')
|
|
26
|
+
# Init Cython shared runtime first so that module init functions
|
|
27
|
+
# inside the same .so can find _p2n_shared already loaded.
|
|
28
|
+
_importlib.import_module('_p2n_shared')
|
|
29
|
+
_native = _importlib.import_module('.main', __name__)
|
|
30
|
+
__pyx_capi__ = getattr(_native, '__pyx_capi__', None)
|
|
31
|
+
from .main import *
|
py2nativepro/__main__.py
ADDED
|
Binary file
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
py2nativepro/py2nativepro.pyd,sha256=77y-A0d1PksfRO0oPwEf3XYe5pvKY5w-G-4j-y7fZpI,403456
|
|
2
|
+
py2nativepro/__init__.py,sha256=_THpAGP_8dDzRbcnsmXZX6qpBQkkP1h3zoexpBQsUEc,1540
|
|
3
|
+
py2nativepro/__main__.py,sha256=Mc_ZNMsZfo_LBZczPOw9D-xJZ6qSijeghT8FatrEftc,174
|
|
4
|
+
py2nativepro-0.1.1.dist-info/top_level.txt,sha256=7ktQopp7vHzBrPPF9uYUHdNhoYneq2wZypU5RJJlYDA,12
|
|
5
|
+
py2nativepro-0.1.1.dist-info/METADATA,sha256=bkz6s7P9KwCemWBs7QGxzN0rFxuC9umlR1vVly0ZzFY,56
|
|
6
|
+
py2nativepro-0.1.1.dist-info/WHEEL,sha256=CtWVuyT7LmnlwGVOWgTPH1SDucyxZEnmswdQySxYHiY,106
|
|
7
|
+
py2nativepro-0.1.1.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
py2nativepro
|