pyarmor 9.0.3__zip → 9.0.4__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-9.0.3 → pyarmor-9.0.4}/PKG-INFO +1 -1
- {pyarmor-9.0.3 → pyarmor-9.0.4}/README.md +6 -1
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/__init__.py +1 -1
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/__main__.py +70 -57
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/bug.py +8 -1
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/context.py +1 -1
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/default.cfg +77 -7
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/register.py +3 -3
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/shell.py +0 -1
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/config.py +1 -1
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/plugins/README.md +4 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor.egg-info/PKG-INFO +1 -1
- pyarmor-9.0.4/pyarmor.egg-info/requires.txt +1 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/setup.py +1 -1
- pyarmor-9.0.3/pyarmor.egg-info/requires.txt +0 -1
- {pyarmor-9.0.3 → pyarmor-9.0.4}/MANIFEST.in +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/README.rst +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/__init__.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/benchmark.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/build_meta.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/bootstrap.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/config.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/core.data.1 +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/core.data.2 +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/core.data.3 +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/docker.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/generate.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/hdinfo.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/merge.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/mixer.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/plugin.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/public_capsule.zip +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/repack.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cli/resource.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/cobuilder.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/README-ZH.md +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/README.md +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/build-for-exe.bat +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/build-for-freeze.bat +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/build-with-project.bat +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/build-with-project.sh +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/cx_Freeze/hello.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/cx_Freeze/queens.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/cx_Freeze/setup.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/helloworld/foo.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/obfuscate-app.bat +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/obfuscate-app.sh +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/obfuscate-pkg.bat +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/obfuscate-pkg.sh +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pack-obfuscated-scripts.bat +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pack-obfuscated-scripts.sh +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/py2exe/hello.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/py2exe/queens.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/py2exe/setup.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/Arithmetic.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/Calls.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/CommandLine.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/Constructs.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/Dict.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/Exceptions.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/Imports.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/Instances.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/Lists.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/Lookups.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/NewInstances.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/Numbers.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/Setup.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/Strings.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/Tuples.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/With.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/clockres.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/package/__init__.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/package/submodule.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/pybench.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/pybench/systimes.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/simple/queens.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/testmod/hello.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/testmod/queens.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/testpkg/main.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/testpkg/mypkg/__init__.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/examples/testpkg/mypkg/foo.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/helper/__init__.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/helper/build_data_module.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/helper/buildext.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/helper/get_bind_key.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/helper/get_license_info.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/helper/get_platform_name.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/helper/merge.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/helper/repack.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/helper/superuntime.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/license.tri +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/packer.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/platforms/darwin/x86_64/_pytransform.dylib +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/platforms/linux/x86/_pytransform.so +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/platforms/linux/x86_64/_pytransform.so +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/platforms/windows/x86/_pytransform.dll +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/platforms/windows/x86_64/_pytransform.dll +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/plugins/check_ntp_time.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/polyfills/__init__.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/polyfills/argparse.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/product.key +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/project.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/protect_code.pt +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/protect_code2.pt +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/public.key +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/public_capsule.zip +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/pyarmor-deprecated.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/pyarmor-webui.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/pyarmor.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/pyimcore.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/pyshield.key +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/pyshield.lic +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/pytransform.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/reform.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/register.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/sppmode.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor/utils.py +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor.egg-info/SOURCES.txt +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor.egg-info/dependency_links.txt +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor.egg-info/entry_points.txt +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/pyarmor.egg-info/top_level.txt +0 -0
- {pyarmor-9.0.3 → pyarmor-9.0.4}/setup.cfg +0 -0
|
@@ -73,12 +73,17 @@ Please read the [Pyarmor EULA](LICENSE).
|
|
|
73
73
|
5. **[Report bugs][issues] following the issue template.**
|
|
74
74
|
6. **For business and security inquiries, send an email to <pyarmor@163.com>.**
|
|
75
75
|
|
|
76
|
+
There are also some third-party learn platforms (not Pyarmor offical)
|
|
77
|
+
|
|
78
|
+
- **[Ask Pyarmor Guru][gurubase], it is a Pyarmor-focused AI to answer your questions**
|
|
79
|
+
|
|
76
80
|
[faq]: https://pyarmor.readthedocs.io/en/latest/questions.html
|
|
77
81
|
[issues]: https://github.com/dashingsoft/pyarmor/issues
|
|
78
82
|
[genindex]: https://pyarmor.readthedocs.io/en/stable/genindex.html
|
|
79
83
|
[mastertoc]: https://pyarmor.readthedocs.io/en/stable/index.html#table-of-contents
|
|
80
84
|
[asking]: https://pyarmor.readthedocs.io/en/latest/questions.html#asking-questions-in-github
|
|
81
85
|
[doc]: https://pyarmor.readthedocs.io/
|
|
86
|
+
[gurubase]: https://gurubase.io/g/pyarmor
|
|
82
87
|
|
|
83
88
|
## Resources
|
|
84
89
|
|
|
@@ -105,6 +110,6 @@ Make sure to read the changelog carefully before upgrading Pyarmor:
|
|
|
105
110
|
|
|
106
111
|
**Full changelogs** at [releases][releases]
|
|
107
112
|
|
|
108
|
-
**Upcoming features** at [Pyarmor Release Plan](ReleasePlan.md)
|
|
113
|
+
**Upcoming features** at [Pyarmor Release Plan](docs/ReleasePlan.md)
|
|
109
114
|
|
|
110
115
|
[releases]: https://github.com/dashingsoft/pyarmor/releases
|
|
@@ -32,7 +32,6 @@ from .shell import PyarmorShell
|
|
|
32
32
|
from .plugin import Plugin
|
|
33
33
|
from .generate import Builder
|
|
34
34
|
from .bootstrap import check_prebuilt_runtime_library
|
|
35
|
-
from .bug import find_solutions
|
|
36
35
|
|
|
37
36
|
|
|
38
37
|
def _cmd_gen_key(builder, options):
|
|
@@ -344,7 +343,30 @@ def cmd_reg(ctx, args):
|
|
|
344
343
|
|
|
345
344
|
|
|
346
345
|
def cmd_man(ctx, args):
|
|
347
|
-
|
|
346
|
+
from subprocess import check_call, check_output, STDOUT
|
|
347
|
+
|
|
348
|
+
try:
|
|
349
|
+
m = __import__('pyarmor.man')
|
|
350
|
+
except ModuleNotFoundError:
|
|
351
|
+
logger.info('pyarmor.man is still not installed')
|
|
352
|
+
if input('Install it now? (Y/n) ') not in ('Y', 'y'):
|
|
353
|
+
return
|
|
354
|
+
m = None
|
|
355
|
+
|
|
356
|
+
if m is None:
|
|
357
|
+
try:
|
|
358
|
+
logger.info('installing package "pyarmor.man"...')
|
|
359
|
+
check_output([sys.executable, '-m', 'pip',
|
|
360
|
+
'install', '-U', 'pyarmor.man'],
|
|
361
|
+
stderr=STDOUT)
|
|
362
|
+
logger.info('install package "pyarmor.man" OK')
|
|
363
|
+
except Exception:
|
|
364
|
+
logger.error('install package "pyarmor.man" failed')
|
|
365
|
+
logger.error('please install it manually:')
|
|
366
|
+
logger.error('\tpip install -U pyarmor.man')
|
|
367
|
+
return
|
|
368
|
+
|
|
369
|
+
check_call([sys.executable, '-m', 'pyarmor.man.shell'])
|
|
348
370
|
|
|
349
371
|
|
|
350
372
|
def main_parser():
|
|
@@ -363,7 +385,7 @@ def main_parser():
|
|
|
363
385
|
)
|
|
364
386
|
parser.add_argument(
|
|
365
387
|
'-d', '--debug', action='store_true',
|
|
366
|
-
help='
|
|
388
|
+
help='generate debug file "pyarmor.debug.log"'
|
|
367
389
|
)
|
|
368
390
|
parser.add_argument(
|
|
369
391
|
'-i', dest='interactive', action='store_true',
|
|
@@ -647,19 +669,18 @@ https://pyarmor.readthedocs.io/en/stable/reference/man.html#pyarmor-reg
|
|
|
647
669
|
|
|
648
670
|
|
|
649
671
|
def man_parser(subparsers):
|
|
650
|
-
'''
|
|
672
|
+
'''Start Pyarmor Man shell
|
|
651
673
|
|
|
652
674
|
Pyarmor Man is designed to help Pyarmor users to learn and use
|
|
653
675
|
Pyarmor, to find solution quickly when something is wrong, to
|
|
654
|
-
report bug
|
|
655
|
-
|
|
676
|
+
report bug by template in order to save both Pyarmor team's
|
|
677
|
+
and users' time.
|
|
656
678
|
'''
|
|
657
|
-
|
|
658
679
|
cparser = subparsers.add_parser(
|
|
659
680
|
'man',
|
|
660
681
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
661
682
|
description=man_parser.__doc__,
|
|
662
|
-
help='
|
|
683
|
+
help='start Pyarmor Man shell'
|
|
663
684
|
)
|
|
664
685
|
|
|
665
686
|
cparser.set_defaults(func=cmd_man)
|
|
@@ -667,43 +688,45 @@ def man_parser(subparsers):
|
|
|
667
688
|
|
|
668
689
|
|
|
669
690
|
def log_settings(ctx, args):
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
root.setLevel(logging.DEBUG)
|
|
673
|
-
handler = logging.FileHandler(ctx.debug_logfile,
|
|
674
|
-
mode='w',
|
|
675
|
-
encoding='utf-8')
|
|
676
|
-
handler.setFormatter(logging.Formatter('%(asctime)s %(message)s'))
|
|
677
|
-
handler.setLevel(logging.DEBUG)
|
|
678
|
-
root.addHandler(handler)
|
|
679
|
-
|
|
680
|
-
tracelog = logging.getLogger('trace')
|
|
681
|
-
tracelog.propagate = False
|
|
682
|
-
tracelog.addHandler(logging.NullHandler())
|
|
683
|
-
if ctx.cfg.getboolean('builder', 'enable_trace'):
|
|
684
|
-
handler = logging.FileHandler(ctx.trace_logfile,
|
|
685
|
-
mode='w',
|
|
686
|
-
encoding='utf-8')
|
|
687
|
-
handler.setFormatter(logging.Formatter('%(name)-20s %(message)s'))
|
|
688
|
-
handler.setLevel(logging.DEBUG if args.debug else logging.INFO)
|
|
689
|
-
tracelog.addHandler(handler)
|
|
691
|
+
import logging.config
|
|
692
|
+
logging.config.fileConfig(ctx.default_config)
|
|
690
693
|
|
|
691
694
|
if args.silent:
|
|
692
|
-
|
|
695
|
+
logger.setLevel(logging.ERROR)
|
|
696
|
+
|
|
697
|
+
elif args.debug:
|
|
698
|
+
logger.setLevel(logging.DEBUG)
|
|
699
|
+
logger.handlers[1].setLevel(logging.DEBUG)
|
|
700
|
+
|
|
701
|
+
if ctx.cfg.getboolean('builder', 'enable_trace'):
|
|
702
|
+
level = logging.DEBUG if args.debug else logging.INFO
|
|
703
|
+
logging.getLogger('trace').setLevel(level)
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
def log_bug(e):
|
|
707
|
+
parser = main_parser()
|
|
708
|
+
args = parser.parse_args(sys.argv[1:])
|
|
709
|
+
ctx = Context(*get_home_paths(args))
|
|
710
|
+
cmdline = ' '.join(sys.argv)
|
|
711
|
+
buglog = logging.getLogger('cli.bug')
|
|
693
712
|
|
|
713
|
+
buglog.info('[BUG]: %s\n', e)
|
|
714
|
+
buglog.info('## Command Line\n%s\n', cmdline)
|
|
715
|
+
buglog.info('## Environments', )
|
|
716
|
+
buglog.info('Python %d.%d.%d', *sys.version_info[:3])
|
|
717
|
+
buglog.info('Pyarmor %s', ctx.version_info())
|
|
718
|
+
buglog.info('Platform %s', ctx.pyarmor_platform)
|
|
719
|
+
buglog.info('Native %s', ctx.native_platform)
|
|
720
|
+
buglog.info('Home %s', ctx.home_path)
|
|
721
|
+
buglog.info('')
|
|
694
722
|
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
log = logging.getLogger('error')
|
|
703
|
-
log.propagate = False
|
|
704
|
-
log.addHandler(logging.NullHandler())
|
|
705
|
-
log.addHandler(handler)
|
|
706
|
-
log.exception(e)
|
|
723
|
+
if not isinstance(e, CliError):
|
|
724
|
+
from traceback import format_exc
|
|
725
|
+
buglog.info('## Traceback\n%s\n', format_exc())
|
|
726
|
+
|
|
727
|
+
# reference/errors.html
|
|
728
|
+
# reference/solutions.html
|
|
729
|
+
# questions.html
|
|
707
730
|
|
|
708
731
|
|
|
709
732
|
def print_version(ctx):
|
|
@@ -729,14 +752,13 @@ def main_entry(argv):
|
|
|
729
752
|
parser = main_parser()
|
|
730
753
|
args = parser.parse_args(argv)
|
|
731
754
|
|
|
755
|
+
ctx = Context(*get_home_paths(args))
|
|
756
|
+
log_settings(ctx, args)
|
|
757
|
+
|
|
732
758
|
x, y = sys.version_info[:2]
|
|
733
759
|
if not (x == 3 and y > 6 and y < 13):
|
|
734
760
|
raise CliError('Python %s.%s is not supported' % (x, y))
|
|
735
761
|
|
|
736
|
-
ctx = Context(*get_home_paths(args))
|
|
737
|
-
|
|
738
|
-
log_settings(ctx, args)
|
|
739
|
-
|
|
740
762
|
if args.version:
|
|
741
763
|
print_version(ctx)
|
|
742
764
|
parser.exit()
|
|
@@ -750,6 +772,7 @@ def main_entry(argv):
|
|
|
750
772
|
|
|
751
773
|
logger.debug('native platform %s', ctx.native_platform)
|
|
752
774
|
logger.debug('home path: %s', ctx.home_path)
|
|
775
|
+
logger.debug('args: %s', argv)
|
|
753
776
|
|
|
754
777
|
if hasattr(args, 'func'):
|
|
755
778
|
return args.func(ctx, args)
|
|
@@ -758,22 +781,12 @@ def main_entry(argv):
|
|
|
758
781
|
|
|
759
782
|
|
|
760
783
|
def main():
|
|
761
|
-
logging.basicConfig(
|
|
762
|
-
level=logging.INFO,
|
|
763
|
-
format='%(levelname)-8s %(message)s',
|
|
764
|
-
)
|
|
765
|
-
|
|
766
784
|
try:
|
|
767
785
|
main_entry(sys.argv[1:])
|
|
768
|
-
except CliError as e:
|
|
769
|
-
logger.error(e)
|
|
770
|
-
find_solutions(e)
|
|
771
|
-
sys.exit(1)
|
|
772
786
|
except Exception as e:
|
|
773
|
-
log_exception(e)
|
|
774
787
|
logger.error(e)
|
|
775
|
-
|
|
776
|
-
sys.exit(2)
|
|
788
|
+
log_bug(e)
|
|
789
|
+
sys.exit(1 if isinstance(e, CliError) else 2)
|
|
777
790
|
|
|
778
791
|
|
|
779
792
|
if __name__ == '__main__':
|
|
@@ -18,7 +18,14 @@
|
|
|
18
18
|
# @Author: Jondy Zhao (pyarmor@163.com)
|
|
19
19
|
#
|
|
20
20
|
# @Create Date: Tue Mar 12 15:19:41 CST 2024
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
#############################################################
|
|
24
|
+
# #
|
|
25
|
+
# Deprecated since Pyarmor 9, use `pyarmor man` instead #
|
|
26
|
+
# #
|
|
27
|
+
#############################################################
|
|
28
|
+
|
|
22
29
|
import logging
|
|
23
30
|
|
|
24
31
|
from string import Template
|
|
@@ -301,7 +301,7 @@ class Context(object):
|
|
|
301
301
|
return rev
|
|
302
302
|
|
|
303
303
|
licinfo = self.license_info
|
|
304
|
-
lictype = 'basic' if licinfo['features']
|
|
304
|
+
lictype = 'basic' if licinfo['features'] in (1, 17) else \
|
|
305
305
|
'pro' if licinfo['features'] == 7 else \
|
|
306
306
|
'group' if licinfo['features'] == 15 else \
|
|
307
307
|
'ci' if licinfo['features'] == 23 else \
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
;; Pyarmor version
|
|
4
4
|
major = 9
|
|
5
5
|
minor = 0
|
|
6
|
-
patch =
|
|
6
|
+
patch = 4
|
|
7
7
|
|
|
8
8
|
;; Compatible core version
|
|
9
|
-
cli.core = 7.6.
|
|
9
|
+
cli.core = 7.6.1
|
|
10
10
|
|
|
11
11
|
;; Deprecated since Pyarmor 8.2.5
|
|
12
12
|
; cli.runtime = 3.2.5
|
|
@@ -18,11 +18,7 @@ timeout = 6
|
|
|
18
18
|
|
|
19
19
|
regurl = https://api.dashingsoft.com/product/key/enter/%s/?
|
|
20
20
|
buyurl = https://jondy.github.io/paypal/index.html
|
|
21
|
-
|
|
22
|
-
[logging]
|
|
23
|
-
|
|
24
|
-
debug_logfile = .pyarmor/pyarmor.debug.log
|
|
25
|
-
trace_logfile = .pyarmor/pyarmor.trace.log
|
|
21
|
+
docurl = https://pyarmor.readthedocs.io/{lang}/latest
|
|
26
22
|
|
|
27
23
|
[finder]
|
|
28
24
|
recursive = 0
|
|
@@ -455,3 +451,77 @@ cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables
|
|
|
455
451
|
|
|
456
452
|
[freebsd.x86_64.bcc]
|
|
457
453
|
cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables -fPIC -fno-stack-protector -c
|
|
454
|
+
|
|
455
|
+
;;;;;;;;;;;;;;;;;;;;;;
|
|
456
|
+
;;
|
|
457
|
+
;; Logging settings
|
|
458
|
+
;;
|
|
459
|
+
;;;;;;;;;;;;;;;;;;;;;;
|
|
460
|
+
[loggers]
|
|
461
|
+
keys=root,cli,trace,bug
|
|
462
|
+
|
|
463
|
+
[handlers]
|
|
464
|
+
keys=console,trace,debug,bug
|
|
465
|
+
|
|
466
|
+
[formatters]
|
|
467
|
+
keys=console,debug,trace,bug
|
|
468
|
+
|
|
469
|
+
[logger_root]
|
|
470
|
+
handlers=console
|
|
471
|
+
|
|
472
|
+
[logger_cli]
|
|
473
|
+
level=INFO
|
|
474
|
+
handlers=console,debug
|
|
475
|
+
qualname=cli
|
|
476
|
+
propagate=0
|
|
477
|
+
|
|
478
|
+
[logger_trace]
|
|
479
|
+
level=ERROR
|
|
480
|
+
handlers=trace
|
|
481
|
+
qualname=trace
|
|
482
|
+
propagate=0
|
|
483
|
+
|
|
484
|
+
[logger_bug]
|
|
485
|
+
level=INFO
|
|
486
|
+
handlers=bug
|
|
487
|
+
qualname=cli.bug
|
|
488
|
+
propagate=0
|
|
489
|
+
|
|
490
|
+
[handler_console]
|
|
491
|
+
class=StreamHandler
|
|
492
|
+
level=INFO
|
|
493
|
+
formatter=console
|
|
494
|
+
args=(sys.stderr,)
|
|
495
|
+
|
|
496
|
+
[handler_debug]
|
|
497
|
+
class=FileHandler
|
|
498
|
+
level=CRITICAL
|
|
499
|
+
formatter=debug
|
|
500
|
+
args=('pyarmor.debug.log', 'w')
|
|
501
|
+
kwargs={'delay': True}
|
|
502
|
+
|
|
503
|
+
[handler_trace]
|
|
504
|
+
class=FileHandler
|
|
505
|
+
level=DEBUG
|
|
506
|
+
formatter=trace
|
|
507
|
+
args=('pyarmor.trace.log', 'w')
|
|
508
|
+
kwargs={'delay': True}
|
|
509
|
+
|
|
510
|
+
[handler_bug]
|
|
511
|
+
class=FileHandler
|
|
512
|
+
level=INFO
|
|
513
|
+
formatter=bug
|
|
514
|
+
args=('pyarmor.bug.log', 'w')
|
|
515
|
+
kwargs={'delay': True}
|
|
516
|
+
|
|
517
|
+
[formatter_console]
|
|
518
|
+
format=%(levelname)-8s %(message)s
|
|
519
|
+
|
|
520
|
+
[formatter_debug]
|
|
521
|
+
format=%(asctime)s %(message)s
|
|
522
|
+
|
|
523
|
+
[formatter_trace]
|
|
524
|
+
format=%(name)-20s %(message)s
|
|
525
|
+
|
|
526
|
+
[formatter_bug]
|
|
527
|
+
format=%(message)s
|
|
@@ -180,7 +180,7 @@ class Register(object):
|
|
|
180
180
|
return parse_token(self.ctx.read_token())
|
|
181
181
|
|
|
182
182
|
def _license_type(self, info):
|
|
183
|
-
return 'basic' if info['features']
|
|
183
|
+
return 'basic' if info['features'] in (1, 17) else \
|
|
184
184
|
'pro' if info['features'] == 7 else \
|
|
185
185
|
'group' if info['features'] == 15 else \
|
|
186
186
|
'ci' if info['features'] == 23 else \
|
|
@@ -687,8 +687,8 @@ class WebRegister(Register):
|
|
|
687
687
|
f.write(data[n:])
|
|
688
688
|
self._write_reg_info(filename, data[i:n])
|
|
689
689
|
else:
|
|
690
|
-
#
|
|
691
|
-
logger.
|
|
690
|
+
# Only for request group token
|
|
691
|
+
logger.debug('no REGINFO found')
|
|
692
692
|
with open(filename, 'wb') as f:
|
|
693
693
|
f.write(data)
|
|
694
694
|
return filename
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pyarmor.cli.core~=7.6.1
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pyarmor.cli.core~=7.6.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|