pyarmor 8.5.7__zip → 8.5.9__zip
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.
- {pyarmor-8.5.7 → pyarmor-8.5.9}/PKG-INFO +1 -1
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/__init__.py +1 -1
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/__main__.py +7 -12
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/bug.py +2 -2
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/context.py +5 -1
- pyarmor-8.5.9/pyarmor/cli/core.data.1 +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/core.data.2 +0 -0
- pyarmor-8.5.9/pyarmor/cli/core.data.3 +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/default.cfg +6 -9
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/docker.py +4 -2
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/generate.py +24 -12
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/plugin.py +5 -4
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/repack.py +371 -199
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/resource.py +1 -1
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/config.py +1 -1
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/packer.py +4 -2
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor.egg-info/PKG-INFO +1 -1
- pyarmor-8.5.9/pyarmor.egg-info/requires.txt +1 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/setup.py +1 -1
- pyarmor-8.5.7/pyarmor/cli/core.data.1 +0 -0
- pyarmor-8.5.7/pyarmor/cli/core.data.3 +0 -0
- pyarmor-8.5.7/pyarmor.egg-info/requires.txt +0 -1
- {pyarmor-8.5.7 → pyarmor-8.5.9}/MANIFEST.in +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/README.md +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/README.rst +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/__init__.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/benchmark.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/build_meta.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/bootstrap.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/config.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/hdinfo.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/merge.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/mixer.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/public_capsule.zip +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/register.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cli/shell.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/cobuilder.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/README-ZH.md +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/README.md +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/build-for-exe.bat +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/build-for-freeze.bat +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/build-with-project.bat +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/build-with-project.sh +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/cx_Freeze/hello.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/cx_Freeze/queens.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/cx_Freeze/setup.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/helloworld/foo.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/obfuscate-app.bat +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/obfuscate-app.sh +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/obfuscate-pkg.bat +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/obfuscate-pkg.sh +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pack-obfuscated-scripts.bat +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pack-obfuscated-scripts.sh +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/py2exe/hello.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/py2exe/queens.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/py2exe/setup.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/Arithmetic.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/Calls.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/CommandLine.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/Constructs.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/Dict.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/Exceptions.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/Imports.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/Instances.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/Lists.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/Lookups.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/NewInstances.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/Numbers.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/Setup.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/Strings.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/Tuples.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/With.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/clockres.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/package/__init__.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/package/submodule.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/pybench.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/pybench/systimes.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/simple/queens.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/testmod/hello.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/testmod/queens.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/testpkg/main.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/testpkg/mypkg/__init__.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/examples/testpkg/mypkg/foo.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/helper/__init__.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/helper/build_data_module.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/helper/buildext.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/helper/get_bind_key.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/helper/get_license_info.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/helper/get_platform_name.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/helper/merge.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/helper/repack.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/helper/superuntime.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/license.tri +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/platforms/darwin/x86_64/_pytransform.dylib +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/platforms/linux/x86/_pytransform.so +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/platforms/linux/x86_64/_pytransform.so +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/platforms/windows/x86/_pytransform.dll +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/platforms/windows/x86_64/_pytransform.dll +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/plugins/README.md +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/plugins/check_ntp_time.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/polyfills/__init__.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/polyfills/argparse.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/product.key +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/project.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/protect_code.pt +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/protect_code2.pt +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/public.key +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/public_capsule.zip +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/pyarmor-deprecated.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/pyarmor-webui.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/pyarmor.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/pyimcore.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/pyshield.key +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/pyshield.lic +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/pytransform.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/reform.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/register.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/sppmode.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor/utils.py +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor.egg-info/SOURCES.txt +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor.egg-info/dependency_links.txt +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor.egg-info/entry_points.txt +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/pyarmor.egg-info/top_level.txt +0 -0
- {pyarmor-8.5.7 → pyarmor-8.5.9}/setup.cfg +0 -0
|
@@ -209,10 +209,10 @@ def check_gen_context(ctx, args):
|
|
|
209
209
|
raise CliError('--outer conflicts with any -e, --period, -b')
|
|
210
210
|
|
|
211
211
|
if args.pack:
|
|
212
|
-
choices = '
|
|
212
|
+
choices = 'onefile', 'onedir', 'F', 'D', 'FC', 'DC'
|
|
213
213
|
if args.pack not in choices and not os.path.isfile(args.pack):
|
|
214
|
-
raise CliError('--pack must be an executable file, '
|
|
215
|
-
'"
|
|
214
|
+
raise CliError('--pack must be an executable file, specfile, '
|
|
215
|
+
'"onefile" or "onedir"')
|
|
216
216
|
if args.no_runtime:
|
|
217
217
|
raise CliError('--pack conficts with --no-runtime, --use-runtime')
|
|
218
218
|
if ctx.import_prefix:
|
|
@@ -232,18 +232,13 @@ def cmd_gen(ctx, args):
|
|
|
232
232
|
return _cmd_gen_key(builder, options)
|
|
233
233
|
elif args.inputs[0].lower() in ('runtime', 'run', 'r'):
|
|
234
234
|
_cmd_gen_runtime(builder, options)
|
|
235
|
-
elif args.pack in ('auto', 'onefile', 'onedir', 'F', 'D', 'FC', 'DC'):
|
|
236
|
-
from .repack import Repacker6
|
|
237
|
-
packer = Repacker6(ctx, args.pack, options['inputs'], args.output)
|
|
238
|
-
packer.check()
|
|
239
|
-
builder.process(options, packer)
|
|
240
|
-
Plugin.post_build(ctx, pack=args.pack)
|
|
241
235
|
elif args.pack:
|
|
242
|
-
from .repack import
|
|
243
|
-
|
|
244
|
-
packer = Repacker(args.pack,
|
|
236
|
+
from .repack import find_packer
|
|
237
|
+
Repacker = find_packer(args.pack)
|
|
238
|
+
packer = Repacker(ctx, args.pack, options['inputs'], args.output)
|
|
245
239
|
packer.check()
|
|
246
240
|
builder.process(options, packer=packer)
|
|
241
|
+
packer.build()
|
|
247
242
|
Plugin.post_build(ctx, pack=args.pack)
|
|
248
243
|
else:
|
|
249
244
|
builder.process(options)
|
|
@@ -36,7 +36,7 @@ $tracelog
|
|
|
36
36
|
$tb
|
|
37
37
|
''')
|
|
38
38
|
|
|
39
|
-
ENABLE_DEBUG_HINTS = '''
|
|
39
|
+
ENABLE_DEBUG_HINTS = '''something is wrong
|
|
40
40
|
*=============================================================*
|
|
41
41
|
* Please enable debug option `-d` to run it again *
|
|
42
42
|
* pyarmor -d gen options ... *
|
|
@@ -49,7 +49,7 @@ ENABLE_DEBUG_HINTS = '''somthing is wrong
|
|
|
49
49
|
*=============================================================*
|
|
50
50
|
'''
|
|
51
51
|
|
|
52
|
-
SOLUTION_HINTS = Template('''
|
|
52
|
+
SOLUTION_HINTS = Template('''something is wrong
|
|
53
53
|
*=============================================================*
|
|
54
54
|
* Please check *
|
|
55
55
|
* https://pyarmor.readthedocs.io/en/latest/questions.html *
|
|
@@ -110,7 +110,11 @@ def format_platform(plat, arch):
|
|
|
110
110
|
('armv6', ('armv6l',)),
|
|
111
111
|
('armv7', ('armv7l',)),
|
|
112
112
|
('aarch32', ('aarch32',)),
|
|
113
|
-
('aarch64', ('aarch64', 'arm64'))
|
|
113
|
+
('aarch64', ('aarch64', 'arm64')),
|
|
114
|
+
('ppc64le', ('ppc64le',)),
|
|
115
|
+
('mips32el', ('mipsel', 'mips32el')),
|
|
116
|
+
('mips64el', ('mips64el',)),
|
|
117
|
+
('riscv64', ('riscv64',)),
|
|
114
118
|
)
|
|
115
119
|
|
|
116
120
|
for alias, platlist in plat_table:
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
;; Pyarmor version
|
|
4
4
|
major = 8
|
|
5
5
|
minor = 5
|
|
6
|
-
patch =
|
|
6
|
+
patch = 9
|
|
7
7
|
|
|
8
8
|
;; Compatible core version
|
|
9
|
-
cli.core = 6.5.
|
|
9
|
+
cli.core = 6.5.2
|
|
10
10
|
|
|
11
11
|
;; Deprecated since Pyarmor 8.2.5
|
|
12
12
|
; cli.runtime = 3.2.5
|
|
@@ -93,6 +93,7 @@ rft_enables = builtin import function class method global local
|
|
|
93
93
|
rft_auto_exclude = 1
|
|
94
94
|
|
|
95
95
|
;; Export all the names in module attribute __all__
|
|
96
|
+
;; It means leave all the names in the __all__ as they're
|
|
96
97
|
rft_auto_export = 1
|
|
97
98
|
|
|
98
99
|
;; Enable dev mode for rft
|
|
@@ -255,18 +256,14 @@ on_error = 0
|
|
|
255
256
|
;; 3600s
|
|
256
257
|
;; 60m
|
|
257
258
|
;; 1h
|
|
258
|
-
;; 1
|
|
259
|
+
;; 1 = 1h
|
|
259
260
|
; period = 1
|
|
260
261
|
|
|
261
|
-
;; Expired runtime key
|
|
262
|
-
;; otherwise check ntp time
|
|
262
|
+
;; Expired runtime key, support 2 forms:
|
|
263
263
|
;;
|
|
264
|
-
;; 30
|
|
264
|
+
;; 30: expired in 30 days
|
|
265
265
|
;; 2025-12-31
|
|
266
266
|
;;
|
|
267
|
-
;; .30
|
|
268
|
-
;; .2025-12-30
|
|
269
|
-
;;
|
|
270
267
|
; expired =
|
|
271
268
|
|
|
272
269
|
;; Check network time by those servers
|
|
@@ -32,6 +32,7 @@ from .register import Register, MACHFLAGS
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
CONFIG = {
|
|
35
|
+
'host': '0.0.0.0',
|
|
35
36
|
'port': 29092,
|
|
36
37
|
'home': os.path.expanduser(os.path.join('~', '.pyarmor', 'docker')),
|
|
37
38
|
'machid': None,
|
|
@@ -110,6 +111,7 @@ def main_entry():
|
|
|
110
111
|
parser = argparse.ArgumentParser()
|
|
111
112
|
parser.add_argument('-d', '--debug', action='store_true',
|
|
112
113
|
help='Enable debug mode')
|
|
114
|
+
parser.add_argument('--host', type=str, default=CONFIG['host'])
|
|
113
115
|
parser.add_argument('-p', '--port', type=int, default=CONFIG['port'],
|
|
114
116
|
help=argparse.SUPPRESS)
|
|
115
117
|
parser.add_argument('-s', '--sock', default='/var/run/docker.sock',
|
|
@@ -135,9 +137,9 @@ def main_entry():
|
|
|
135
137
|
CONFIG['machid'] = [Pytransform3.get_hd_info(x) for x in MACHFLAGS]
|
|
136
138
|
logging.debug('machine id: %s', CONFIG['machid'])
|
|
137
139
|
|
|
138
|
-
host, port =
|
|
140
|
+
host, port = args.host, args.port
|
|
139
141
|
with socketserver.TCPServer((host, port), DockerAuthHandler) as server:
|
|
140
|
-
logging.info('listen container auth request on %s:%s', host,
|
|
142
|
+
logging.info('listen container auth request on %s:%s', host, port)
|
|
141
143
|
server.serve_forever()
|
|
142
144
|
|
|
143
145
|
|
|
@@ -67,7 +67,7 @@ class Finder(object):
|
|
|
67
67
|
for res in self._build_resource(resources):
|
|
68
68
|
if res.pkgname not in resnames:
|
|
69
69
|
self.ctx.obfuscated_modules.add(res.pkgname)
|
|
70
|
-
self.ctx.
|
|
70
|
+
self.ctx.resources.append(res)
|
|
71
71
|
|
|
72
72
|
def process(self):
|
|
73
73
|
logger.info('search inputs ...')
|
|
@@ -99,6 +99,21 @@ class Builder(object):
|
|
|
99
99
|
self.ctx.runtime_key = self.generate_runtime_key()
|
|
100
100
|
Pytransform3.generate_runtime_package(self.ctx, output)
|
|
101
101
|
|
|
102
|
+
def _generate_obfuscated_script(self, res):
|
|
103
|
+
try:
|
|
104
|
+
return Pytransform3.generate_obfuscated_script(self.ctx, res)
|
|
105
|
+
except RuntimeError as e:
|
|
106
|
+
if str(e) != 'out of license':
|
|
107
|
+
raise
|
|
108
|
+
|
|
109
|
+
def _copy_script(self, path, res):
|
|
110
|
+
logger.warning('%s is not obfuscated because out of license', res)
|
|
111
|
+
fullpath = os.path.join(path, res.output_filename)
|
|
112
|
+
output = os.path.dirname(fullpath)
|
|
113
|
+
os.makedirs(output, exist_ok=True)
|
|
114
|
+
logger.info('write %s (not obfuscated)', fullpath)
|
|
115
|
+
shutil.copy2(res.fullpath, output)
|
|
116
|
+
|
|
102
117
|
def _obfuscate_scripts(self):
|
|
103
118
|
rev = self.ctx.version_info()
|
|
104
119
|
template = self.ctx.bootstrap_template
|
|
@@ -126,7 +141,10 @@ class Builder(object):
|
|
|
126
141
|
continue
|
|
127
142
|
|
|
128
143
|
logger.info('obfuscating %s', r)
|
|
129
|
-
code =
|
|
144
|
+
code = self._generate_obfuscated_script(r)
|
|
145
|
+
if code is None:
|
|
146
|
+
self._copy_script(path, r)
|
|
147
|
+
continue
|
|
130
148
|
source = r.generate_output(
|
|
131
149
|
template, code, relative=relative, pkgname=pkgname,
|
|
132
150
|
bootpath=bootpath, rev=rev
|
|
@@ -156,13 +174,10 @@ class Builder(object):
|
|
|
156
174
|
finder = Finder(self.ctx)
|
|
157
175
|
finder.process()
|
|
158
176
|
|
|
159
|
-
if packer:
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
auto_resources = packer.analysis()
|
|
164
|
-
logger.info('find extra resources: %s', auto_resources)
|
|
165
|
-
finder.append(auto_resources)
|
|
177
|
+
if packer and hasattr(packer, 'analysis'):
|
|
178
|
+
auto_resources = packer.analysis()
|
|
179
|
+
logger.info('find extra resources: %s', auto_resources)
|
|
180
|
+
finder.append(auto_resources)
|
|
166
181
|
|
|
167
182
|
Pytransform3.pre_build(self.ctx)
|
|
168
183
|
|
|
@@ -177,6 +192,3 @@ class Builder(object):
|
|
|
177
192
|
logger.info('obfuscate scripts OK')
|
|
178
193
|
|
|
179
194
|
Pytransform3.post_build(self.ctx)
|
|
180
|
-
|
|
181
|
-
if packer:
|
|
182
|
-
packer.repack(output, self.ctx.runtime_package_name)
|
|
@@ -236,10 +236,11 @@ def find_runtime_package(ctx, output):
|
|
|
236
236
|
return os.path.join(output, rtname)
|
|
237
237
|
if isinstance(prefix, str):
|
|
238
238
|
return os.path.join(output, prefix.replace('.', os.path.sep), rtname)
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
if
|
|
242
|
-
|
|
239
|
+
with os.scandir(output) as iterator:
|
|
240
|
+
for entry in iterator:
|
|
241
|
+
if entry.is_dir():
|
|
242
|
+
if rtname in os.listdir(entry.path):
|
|
243
|
+
return os.path.join(entry.path, rtname)
|
|
243
244
|
|
|
244
245
|
|
|
245
246
|
class DarwinUniversalPlugin:
|