/
config.py
executable file
·112 lines (85 loc) · 3.25 KB
/
config.py
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
from distutils.util import get_platform
version = '5.4.5'
version_info = '''
PyArmor is a command line tool used to obfuscate python scripts, bind
obfuscated scripts to fixed machine or expire obfuscated scripts.
For more information, refer to https://pyarmor.readthedocs.io
'''
purchase_info = '''
If there is no registration code yet, please purchase one by visiting
https://order.shareit.com/cart/add?vendorid=200089125&PRODUCT[300871197]=1
'''
# The last three components of the filename before the extension are
# called "compatibility tags." The compatibility tags express the
# package's basic interpreter requirements and are detailed in PEP
# 425(https://www.python.org/dev/peps/pep-0425).
plat_name = get_platform().split('-')
plat_name = '_'.join(plat_name if len(plat_name) < 3 else plat_name[0:3:2])
plat_name = plat_name.replace('i586', 'i386') \
.replace('i686', 'i386') \
.replace('armv7l', 'armv7') \
.replace('intel', 'x86_64')
dll_ext = '.so' if plat_name.startswith('linux') else \
'.dylib' if plat_name.startswith('macosx') else \
'.dll'
dll_name = '_pytransform'
entry_lines = 'from %spytransform import pyarmor_runtime\n', \
'pyarmor_runtime(%s)\n'
protect_code_template = 'protect_code.pt'
config_filename = '.pyarmor_config'
capsule_filename = '.pyarmor_capsule.zip'
license_filename = 'license.lic'
default_output_path = 'dist'
default_manifest_template = 'global-include *.py'
default_obf_module_mode = 'des'
default_obf_code_mode = 'des'
platform_prefix = 'https://pyarmor.dashingsoft.com/downloads/platforms'
platform_config = 'index.json'
#
# DEPRECATED From v3.4.0, all the follwing lines will be removed from v4
#
# Extra suffix char for encrypted python scripts
ext_char = 'e'
wrap_runner = '''import pyimcore
from pytransform import exec_file
exec_file('%s')
'''
trial_info = '''
You're using trail version. Free trial version never expires,
the limitations are
- The maximum size of code object is 35728 bytes in trial version
- The scripts obfuscated by trial version are not private. It means
anyone could generate the license file which works for these
obfuscated scripts.
A registration code is required to obfuscate big code object or
generate private obfuscated scripts.
If PyArmor is helpful for you, please purchase one by visiting
https://order.shareit.com/cart/add?vendorid=200089125&PRODUCT[300871197]=1
If you have received a registration code, run the following command to
make it effective::
pyarmor register REGISTRATION_CODE
Enjoy it!
'''
help_footer = '''
For more information, refer to http://pyarmor.dashingsoft.com
'''
download_url = 'http://pyarmor.dashingsoft.com/downloads/platforms'
support_platforms = [
(
('win32', 'win32'),
('win_amd64', 'win_amd64'),
('manylinux1_i686', 'linux_i386'),
('manylinux1_x86_64', 'linux_x86_64'),
('macosx_10_11_x86_64', 'macosx_x86_64'),
),
(
('linux_ppc64', 'ppc64le'),
('linux_armv5', 'armv5'),
('linux_armv7', 'armv7'),
('linux_aarch32', 'armv8.32-bit'),
('linux_aarch64', 'armv8.64-bit'),
('linux.musl_x86_64', 'alpine'),
('ios_arm64', 'ios.arm64'),
('freebsd_x86_64', 'freebsd'),
)
]