pyarmor 8.0.16__zip → 8.0.18__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.
Files changed (112) hide show
  1. {pyarmor-8.0.16 → pyarmor-8.0.18}/PKG-INFO +1 -1
  2. {pyarmor-8.0.16 → pyarmor-8.0.18}/README.md +18 -21
  3. {pyarmor-8.0.16 → pyarmor-8.0.18}/pyarmor.egg-info/PKG-INFO +1 -1
  4. {pyarmor-8.0.16 → pyarmor-8.0.18}/pyarmor.egg-info/SOURCES.txt +1 -0
  5. {pyarmor-8.0.16 → pyarmor-8.0.18}/pyarmor.egg-info/entry_points.txt +1 -0
  6. pyarmor-8.0.18/pyarmor.egg-info/requires.txt +1 -0
  7. {pyarmor-8.0.16 → pyarmor-8.0.18}/setup.py +3 -2
  8. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/cli/__main__.py +5 -0
  9. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/cli/context.py +8 -5
  10. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/cli/default.cfg +2 -5
  11. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/cli/register.py +1 -1
  12. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/config.py +1 -1
  13. pyarmor-8.0.18/src/public_capsule.zip +0 -0
  14. pyarmor-8.0.16/pyarmor.egg-info/requires.txt +0 -1
  15. {pyarmor-8.0.16 → pyarmor-8.0.18}/MANIFEST.in +0 -0
  16. {pyarmor-8.0.16 → pyarmor-8.0.18}/pyarmor.egg-info/dependency_links.txt +0 -0
  17. {pyarmor-8.0.16 → pyarmor-8.0.18}/pyarmor.egg-info/top_level.txt +0 -0
  18. {pyarmor-8.0.16 → pyarmor-8.0.18}/setup.cfg +0 -0
  19. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/README.rst +0 -0
  20. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/__init__.py +0 -0
  21. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/benchmark.py +0 -0
  22. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/build_meta.py +0 -0
  23. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/cli/__init__.py +0 -0
  24. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/cli/config.py +0 -0
  25. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/cli/errors.py +0 -0
  26. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/cli/generate.py +0 -0
  27. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/cli/mixer.py +0 -0
  28. {pyarmor-8.0.16/src → pyarmor-8.0.18/src/cli}/public_capsule.zip +0 -0
  29. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/cli/repack.py +0 -0
  30. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/cli/resource.py +0 -0
  31. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/cli/shell.py +0 -0
  32. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/cobuilder.py +0 -0
  33. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/README-ZH.md +0 -0
  34. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/README.md +0 -0
  35. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/build-for-exe.bat +0 -0
  36. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/build-for-freeze.bat +0 -0
  37. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/build-with-project.bat +0 -0
  38. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/build-with-project.sh +0 -0
  39. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/cx_Freeze/hello.py +0 -0
  40. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/cx_Freeze/queens.py +0 -0
  41. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/cx_Freeze/setup.py +0 -0
  42. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/helloworld/foo.py +0 -0
  43. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/obfuscate-app.bat +0 -0
  44. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/obfuscate-app.sh +0 -0
  45. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/obfuscate-pkg.bat +0 -0
  46. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/obfuscate-pkg.sh +0 -0
  47. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pack-obfuscated-scripts.bat +0 -0
  48. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pack-obfuscated-scripts.sh +0 -0
  49. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/py2exe/hello.py +0 -0
  50. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/py2exe/queens.py +0 -0
  51. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/py2exe/setup.py +0 -0
  52. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/Arithmetic.py +0 -0
  53. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/Calls.py +0 -0
  54. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/CommandLine.py +0 -0
  55. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/Constructs.py +0 -0
  56. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/Dict.py +0 -0
  57. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/Exceptions.py +0 -0
  58. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/Imports.py +0 -0
  59. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/Instances.py +0 -0
  60. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/Lists.py +0 -0
  61. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/Lookups.py +0 -0
  62. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/NewInstances.py +0 -0
  63. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/Numbers.py +0 -0
  64. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/Setup.py +0 -0
  65. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/Strings.py +0 -0
  66. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/Tuples.py +0 -0
  67. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/With.py +0 -0
  68. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/clockres.py +0 -0
  69. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/package/__init__.py +0 -0
  70. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/package/submodule.py +0 -0
  71. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/pybench.py +0 -0
  72. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/pybench/systimes.py +0 -0
  73. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/simple/queens.py +0 -0
  74. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/testmod/hello.py +0 -0
  75. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/testmod/queens.py +0 -0
  76. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/testpkg/main.py +0 -0
  77. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/testpkg/mypkg/__init__.py +0 -0
  78. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/examples/testpkg/mypkg/foo.py +0 -0
  79. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/helper/__init__.py +0 -0
  80. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/helper/build_data_module.py +0 -0
  81. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/helper/buildext.py +0 -0
  82. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/helper/get_bind_key.py +0 -0
  83. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/helper/get_license_info.py +0 -0
  84. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/helper/get_platform_name.py +0 -0
  85. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/helper/merge.py +0 -0
  86. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/helper/repack.py +0 -0
  87. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/helper/superuntime.py +0 -0
  88. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/license.tri +0 -0
  89. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/packer.py +0 -0
  90. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/platforms/darwin/x86_64/_pytransform.dylib +0 -0
  91. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/platforms/linux/x86/_pytransform.so +0 -0
  92. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/platforms/linux/x86_64/_pytransform.so +0 -0
  93. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/platforms/windows/x86/_pytransform.dll +0 -0
  94. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/platforms/windows/x86_64/_pytransform.dll +0 -0
  95. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/plugins/README.md +0 -0
  96. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/plugins/check_ntp_time.py +0 -0
  97. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/polyfills/__init__.py +0 -0
  98. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/polyfills/argparse.py +0 -0
  99. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/product.key +0 -0
  100. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/project.py +0 -0
  101. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/protect_code.pt +0 -0
  102. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/protect_code2.pt +0 -0
  103. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/public.key +0 -0
  104. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/pyarmor-webui.py +0 -0
  105. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/pyarmor.py +0 -0
  106. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/pyshield.key +0 -0
  107. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/pyshield.lic +0 -0
  108. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/pytransform.py +0 -0
  109. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/reform.py +0 -0
  110. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/register.py +0 -0
  111. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/sppmode.py +0 -0
  112. {pyarmor-8.0.16 → pyarmor-8.0.18}/src/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: pyarmor
3
- Version: 8.0.16
3
+ Version: 8.0.18
4
4
  Summary: A tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.
5
5
  Home-page: https://github.com/dashingsoft/pyarmor
6
6
  Author: Jondy Zhao
@@ -125,14 +125,14 @@ It's important to read this carefully before upgrading pyarmor.
125
125
 
126
126
  ## Import Notes for Pyarmor prior to 8.0
127
127
 
128
- In future only bug fix for old modes, no new features for old modes.
128
+ In future only bug fix for old commands, no new features for old commands.
129
129
 
130
- Most of the old commands could be used normally, but there still have some
131
- changes.
130
+ The old commands `obfuscate`, `licenses` etc. still could be used, but there
131
+ have some changes.
132
132
 
133
133
  There are 3 cases for old users after Pyarmor 8.0 is released:
134
134
 
135
- 1. Never upgrade to 8.0+
135
+ ### 1. Never upgrade to 8.0+
136
136
 
137
137
  - SPP mode doesn't work
138
138
 
@@ -148,33 +148,30 @@ There are 3 cases for old users after Pyarmor 8.0 is released:
148
148
  - Registering Pyarmor by `pyarmor register pyarmor-regcode-xxxxxx.txt` can be
149
149
  used no more than 10 times
150
150
 
151
- If using Pyarmor in CI server or docker, regsiter Pyarmor by the second
151
+ In order to use Pyarmor in new machine, CI server or docker, check the second
152
152
  method described in the registration file "pyarmor-regcode-xxxxxx.txt":
153
153
 
154
- Downloading "pyarmor-regfile-xxxxxx.zip" once, use this `.zip` file to
155
- register Pyarmor later.
154
+ Downloading "pyarmor-regfile-xxxxxx.zip" once, use this `.zip` file to
155
+ register Pyarmor later.
156
156
 
157
- 2. Upgrade to 8.0 but only use old features
157
+ ### 2. Upgrade to 8.0 but only use old features
158
158
 
159
- - Command `pyarmor -v` only checks and prints new Pyarmor License
160
- - Command `pyarmor -h` only prints help for new cli
159
+ By default, command `pyarmor` only accepts new commands, there are 3 ways to
160
+ use old commands such as `obfuscate`, `licenses`:
161
161
 
162
- There are 3 ways to use old commands `obfuscate`, `licenses` etc.:
162
+ - Use `pyarmor-7` instead `pyarmor`
163
+ - Export environment variable `PYARMOR_CLI=7`, then still use `pyarmor`
164
+ - Any way to call entry point `pyarmor.pyarmor:main_entry`
163
165
 
164
- - Export environment variable `PYARMOR_CLI=7`
165
- - Use command `pyarmor-7`
166
- - Any way to call `pyarmor.pyarmor:main_entry` or recreate command `pyarmor`
167
- link to this entry point
166
+ ### 3. Upgrade to 8.0 and use new features
168
167
 
169
- 3. Upgrade to 8.0 and use new features
170
-
171
- - Follow new [EULA of Pyarmor](LICENSE). Especially for old personal license,
172
- because new license only allows one proudct.
168
+ - Follow new [EULA of Pyarmor](LICENSE). It's a big change for old personal
169
+ license, because new license only allows one proudct.
173
170
 
174
171
  - Not all old licenses could be upgraded to new license freely, refer to
175
172
  [Pyarmor licenses][licenses]
176
173
 
177
- - The old features need not internect connection, but new features need
174
+ - The old commands need not internect connection, but new command need
178
175
 
179
- - The old features support Python 2.7~3.10, but new features only support
176
+ - The old commands support Python 2.7~3.10, but new command only support
180
177
  Python 3.7+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: pyarmor
3
- Version: 8.0.16
3
+ Version: 8.0.18
4
4
  Summary: A tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.
5
5
  Home-page: https://github.com/dashingsoft/pyarmor
6
6
  Author: Jondy Zhao
@@ -38,6 +38,7 @@ src/cli/default.cfg
38
38
  src/cli/errors.py
39
39
  src/cli/generate.py
40
40
  src/cli/mixer.py
41
+ src/cli/public_capsule.zip
41
42
  src/cli/register.py
42
43
  src/cli/repack.py
43
44
  src/cli/resource.py
@@ -1,4 +1,5 @@
1
1
  [console_scripts]
2
2
  pyarmor = pyarmor.pyarmor:main_entry_8
3
3
  pyarmor-7 = pyarmor.pyarmor:main_entry
4
+ pyarmor-8 = pyarmor.cli.__main__:main
4
5
 
@@ -0,0 +1 @@
1
+ pyarmor.cli.core~=1.0.7
@@ -109,17 +109,18 @@ setup(
109
109
  package_dir={'pyarmor': 'src'},
110
110
  package_data={
111
111
  'pyarmor': pyarmor_data_files + platform_data_files,
112
- 'pyarmor.cli': ['default.cfg'],
112
+ 'pyarmor.cli': ['default.cfg', 'public_capsule.zip'],
113
113
  },
114
114
 
115
115
  install_requires=[
116
- 'pyarmor.cli.core~=1.0.6'
116
+ 'pyarmor.cli.core~=1.0.7'
117
117
  ],
118
118
 
119
119
  entry_points={
120
120
  'console_scripts': [
121
121
  'pyarmor=pyarmor.pyarmor:main_entry_8',
122
122
  'pyarmor-7=pyarmor.pyarmor:main_entry',
123
+ 'pyarmor-8=pyarmor.cli.__main__:main',
123
124
  ],
124
125
  },
125
126
  )
@@ -85,6 +85,11 @@ def format_gen_args(ctx, args):
85
85
  options['no_runtime'] = True
86
86
  options['use_runtime'] = args.use_runtime
87
87
 
88
+ if options.get('assert_call') or options.get('assert_import'):
89
+ if options.get('restrict_module', 0) < 2:
90
+ logger.debug('implicitly set restrict_module = 2')
91
+ options['restrict_module'] = 2
92
+
88
93
  if options.get('restrict_module', 0) > 1:
89
94
  options['mix_coname'] = 1
90
95
 
@@ -253,15 +253,18 @@ class Context(object):
253
253
  def local_config(self):
254
254
  return os.path.join(self.local_path, 'config')
255
255
 
256
+ def _make_public_capsule(self, filename):
257
+ from shutil import copy
258
+ os.makedirs(os.path.dirname(filename), exist_ok=True)
259
+ path = os.path.dirname(__file__)
260
+ public_capsule = os.path.join(path, 'public_capsule.zip')
261
+ copy(public_capsule, filename)
262
+
256
263
  @property
257
264
  def private_capsule(self):
258
265
  filename = os.path.join(self.reg_path, '.pyarmor_capsule.zip')
259
266
  if not os.path.exists(filename):
260
- from shutil import copy
261
- path = os.path.dirname(__file__)
262
- public_capsule = os.path.join(path, '..', 'public_capsule.zip')
263
- os.makedirs(self.reg_path, exist_ok=True)
264
- copy(public_capsule, filename)
267
+ self._make_public_capsule(self.reg_path)
265
268
  return filename
266
269
 
267
270
  @property
@@ -3,7 +3,7 @@
3
3
  ;; Pyarmor version
4
4
  major = 8
5
5
  minor = 0
6
- patch = 16
6
+ patch = 18
7
7
 
8
8
  ;; Core version
9
9
  core = 1
@@ -55,7 +55,7 @@ encoding = utf-8
55
55
  ;; the interpreter as given by -O options. Explicit levels are 0 (no
56
56
  ;; optimization; __debug__ is true), 1 (asserts are removed, __debug__
57
57
  ;; is false) or 2 (docstrings are removed too).
58
- optimize = 2
58
+ optimize = 1
59
59
  no_annotations = true
60
60
  no_type_comments = true
61
61
 
@@ -100,9 +100,6 @@ clear_module_co = 1
100
100
  ;; Sometimes __file__ is not defined, replace it with __name__ to fix this issue
101
101
  bootstrap_file = __file__
102
102
 
103
- ;; Do not obfuscate len(co.co_code) < this value
104
- co_threshold = 8
105
-
106
103
  ;; Exclude co objects by co_name
107
104
  exclude_co_names = <lambda> <listcomp> <setcomp> <dictcomp> <generator>
108
105
 
@@ -263,7 +263,7 @@ class WebRegister(Register):
263
263
  '',
264
264
  ])
265
265
  if info['product'] == 'non-profits':
266
- lines.append('This license is about to be ussd for non-profits')
266
+ lines.append('This license is about to be used for non-profits')
267
267
 
268
268
  lines.extend(['', ''])
269
269
  return '\n'.join(lines)
@@ -1,6 +1,6 @@
1
1
  from sys import platform
2
2
 
3
- version = '8.0.16'
3
+ version = '8.0.18'
4
4
 
5
5
  # The corresponding version of pytransform.so
6
6
  core_version = 'r52.6'
Binary file
@@ -1 +0,0 @@
1
- pyarmor.cli.core~=1.0.6
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