mirror of
https://github.com/Flowseal/tg-ws-proxy.git
synced 2026-06-24 15:31:07 +03:00
fix(packaging): bundle setuptools/_vendor for frozen pkg_resources
Setuptools 80+ pkg_resources imports jaraco.* and platformdirs after adding setuptools/_vendor to sys.path. PyInstaller onefile did not ship that tree, causing ModuleNotFoundError: jaraco at pyi_rth_pkgres. Include the full _vendor directory as datas; add platformdirs to hiddenimports. Applied to windows, linux, and macos specs. Made-with: Cursor
This commit is contained in:
@@ -5,11 +5,18 @@ import os
|
||||
|
||||
block_cipher = None
|
||||
|
||||
import setuptools
|
||||
|
||||
_vendor = os.path.join(os.path.dirname(setuptools.__file__), '_vendor')
|
||||
_macos_datas = (
|
||||
[(_vendor, os.path.join('setuptools', '_vendor'))]
|
||||
if os.path.isdir(_vendor) else [])
|
||||
|
||||
a = Analysis(
|
||||
[os.path.join(os.path.dirname(SPEC), os.pardir, 'macos.py')],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[],
|
||||
datas=_macos_datas,
|
||||
hiddenimports=[
|
||||
'rumps',
|
||||
'objc',
|
||||
@@ -21,6 +28,7 @@ a = Analysis(
|
||||
'cryptography.hazmat.primitives.ciphers.algorithms',
|
||||
'cryptography.hazmat.primitives.ciphers.modes',
|
||||
'cryptography.hazmat.backends.openssl',
|
||||
'platformdirs',
|
||||
],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
|
||||
Reference in New Issue
Block a user