FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cefpython/examples/pyinstaller/pyinstaller.spec at cefpython58 · op-secure/cefpython · GitHub
op-secure
cefpython
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cefpython
/
examples
/
pyinstaller
/
pyinstaller.spec
Copy path
More file actions
More file actions
Latest commit
History
History
History
75 lines (64 loc) · 2.41 KB
Breadcrumbs
cefpython
/
examples
/
pyinstaller
/
pyinstaller.spec
Copy path
File metadata and controls
75 lines (64 loc) · 2.41 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# -*- mode: python -*-
# -*- coding: utf-8 -*-
"""
This is a PyInstaller spec file.
"""
import
os
from
PyInstaller
.
building
.
api
import
PYZ
,
EXE
,
COLLECT
from
PyInstaller
.
building
.
build_main
import
Analysis
from
PyInstaller
.
utils
.
hooks
import
is_module_satisfies
from
PyInstaller
.
archive
.
pyz_crypto
import
PyiBlockCipher
# Constants
DEBUG
=
os
.
environ
.
get
(
"CEFPYTHON_PYINSTALLER_DEBUG"
,
False
)
PYCRYPTO_MIN_VERSION
=
"2.6.1"
# Set this secret cipher to some secret value. It will be used
# to encrypt archive package containing your app's bytecode
# compiled Python modules, to make it harder to extract these
# files and decompile them. If using secret cipher then you
# must install pycrypto package by typing: "pip install pycrypto".
# Note that this will only encrypt archive package containing
# imported modules, it won't encrypt the main script file
# (wxpython.py). The names of all imported Python modules can be
# still accessed, only their contents are encrypted.
SECRET_CIPHER
=
"This-is-a-secret-phrase"
# Only first 16 chars are used
# ----------------------------------------------------------------------------
# Main
# ----------------------------------------------------------------------------
if
SECRET_CIPHER
:
# If using secret cipher then pycrypto package must be installed
if
not
is_module_satisfies
(
"pycrypto >= %s"
%
PYCRYPTO_MIN_VERSION
):
raise
SystemExit
(
"Error: pycrypto %s or higher is required. "
"To install type: pip install --upgrade pycrypto"
%
PYCRYPTO_MIN_VERSION
)
cipher_obj
=
PyiBlockCipher
(
key
=
SECRET_CIPHER
)
else
:
cipher_obj
=
None
a
=
Analysis
(
[
"../wxpython.py"
],
hookspath
=
[
"."
],
# To find "hook-cefpython3.py"
cipher
=
cipher_obj
,
win_private_assemblies
=
True
,
win_no_prefer_redirects
=
True
,
)
if
not
os
.
environ
.
get
(
"PYINSTALLER_CEFPYTHON3_HOOK_SUCCEEDED"
,
None
):
raise
SystemExit
(
"Error: Pyinstaller hook-cefpython3.py script was "
"not executed or it failed"
)
pyz
=
PYZ
(
a
.
pure
,
a
.
zipped_data
,
cipher
=
cipher_obj
)
exe
=
EXE
(
pyz
,
a
.
scripts
,
exclude_binaries
=
True
,
name
=
"cefapp"
,
debug
=
DEBUG
,
strip
=
False
,
upx
=
False
,
console
=
DEBUG
,
icon
=
"../resources/wxpython.ico"
)
COLLECT
(
exe
,
a
.
binaries
,
a
.
zipfiles
,
a
.
datas
,
strip
=
False
,
upx
=
False
,
name
=
"cefapp"
)
Back
|
FazBrowse Home
|
New Git URL