pyarmor.cli.core 6.5.1__zip → 6.5.2__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.

Potentially problematic release.


This version of pyarmor.cli.core might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: pyarmor.cli.core
3
- Version: 6.5.1
3
+ Version: 6.5.2
4
4
  Summary: Provide extension module pytransform3 for Pyarmor
5
5
  Home-page: https://github.com/dashingsoft/pyarmor
6
6
  Author: Jondy Zhao
@@ -15,28 +15,45 @@ Description: pyarmo.cli.core
15
15
 
16
16
  It includes prebuilt extensions support the following platforms for Python 3.7+:
17
17
 
18
- .. table::
18
+ .. table:: Supported Platforms (1)
19
19
  :widths: auto
20
20
 
21
- ======== ======== ======== ======== ======== ======== ======== ==========
22
- Arch x86_64 i686 aarch64 aarch32 armv7 armv6 Remark
23
- ======== ======== ======== ======== ======== ======== ======== ==========
24
- Darwin Y No Y No No No [#]_
25
- Linux Y Y Y (?) (?) (?) [#]_
26
- Windows Y Y (?) No No No [#]_
27
- Android Y Y Y No Y No [#]_
28
- Alpine Y (?) Y (?) (?) (?)
29
- FreeBSD Y No No No No No
30
- ======== ======== ======== ======== ======== ======== ======== ==========
21
+ ======== ======== ===== ========= ========= ======= ======= ==========
22
+ Arch x86_64 x86 aarch64 aarch32 armv7 armv6 Remark
23
+ ======== ======== ===== ========= ========= ======= ======= ==========
24
+ Darwin Y No Y No No No [#]_
25
+ Linux Y Y Y (?) (?) (?) [#]_
26
+ Windows Y Y (?) No No No [#]_
27
+ Android Y Y Y No Y No [#]_
28
+ Alpine Y (?) Y (?) (?) (?)
29
+ FreeBSD Y No No No No No
30
+ ======== ======== ===== ========= ========= ======= ======= ==========
31
+
32
+
33
+ .. table:: Supported Platforms (2) [#]_
34
+ :widths: auto
35
+
36
+ ======== ========= ============= ========= ==========
37
+ Arch ppc64le mips32/64el riscv64 Remark
38
+ ======== ========= ============= ========= ==========
39
+ Darwin No No No
40
+ Linux Y Y Y [#]_
41
+ Windows No No No
42
+ Android No No No
43
+ Alpine Y Y Y
44
+ FreeBSD No No No
45
+ ======== ========= ============= ========= ==========
31
46
 
32
47
  * Y: already available
33
48
  * No: no support plan
34
49
  * (?): not available now, maybe work in future
35
50
 
36
- .. [#] Apple Silicon only for Python 3.9+
51
+ .. [#] Apple Silicon only works for Python 3.9+
37
52
  .. [#] This is built with glibc
38
53
  .. [#] Themedia protection extensions are introduced in v3.2.3
39
54
  .. [#] All below platforms are introduced in v3.2.3
55
+ .. [#] All of these platforms are introduced in v6.5.2
56
+ .. [#] Arch riscv64 only works for Python 3.10+
40
57
 
41
58
  .. _Pyarmor: https://pypi.python.org/pypi/pyarmor/
42
59
  .. _Extension Module: https://packaging.python.org/en/latest/glossary/#term-Extension-Module
@@ -0,0 +1,51 @@
1
+ pyarmo.cli.core
2
+ ===============
3
+
4
+ Pyarmor_ is a command line tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.
5
+
6
+ This package provides prebuilt `extension module`_ ``pytransform3`` and ``pyarmor_runtime`` required by Pyarmor_
7
+
8
+ It includes prebuilt extensions support the following platforms for Python 3.7+:
9
+
10
+ .. table:: Supported Platforms (1)
11
+ :widths: auto
12
+
13
+ ======== ======== ===== ========= ========= ======= ======= ==========
14
+ Arch x86_64 x86 aarch64 aarch32 armv7 armv6 Remark
15
+ ======== ======== ===== ========= ========= ======= ======= ==========
16
+ Darwin Y No Y No No No [#]_
17
+ Linux Y Y Y (?) (?) (?) [#]_
18
+ Windows Y Y (?) No No No [#]_
19
+ Android Y Y Y No Y No [#]_
20
+ Alpine Y (?) Y (?) (?) (?)
21
+ FreeBSD Y No No No No No
22
+ ======== ======== ===== ========= ========= ======= ======= ==========
23
+
24
+
25
+ .. table:: Supported Platforms (2) [#]_
26
+ :widths: auto
27
+
28
+ ======== ========= ============= ========= ==========
29
+ Arch ppc64le mips32/64el riscv64 Remark
30
+ ======== ========= ============= ========= ==========
31
+ Darwin No No No
32
+ Linux Y Y Y [#]_
33
+ Windows No No No
34
+ Android No No No
35
+ Alpine Y Y Y
36
+ FreeBSD No No No
37
+ ======== ========= ============= ========= ==========
38
+
39
+ * Y: already available
40
+ * No: no support plan
41
+ * (?): not available now, maybe work in future
42
+
43
+ .. [#] Apple Silicon only works for Python 3.9+
44
+ .. [#] This is built with glibc
45
+ .. [#] Themedia protection extensions are introduced in v3.2.3
46
+ .. [#] All below platforms are introduced in v3.2.3
47
+ .. [#] All of these platforms are introduced in v6.5.2
48
+ .. [#] Arch riscv64 only works for Python 3.10+
49
+
50
+ .. _Pyarmor: https://pypi.python.org/pypi/pyarmor/
51
+ .. _Extension Module: https://packaging.python.org/en/latest/glossary/#term-Extension-Module
@@ -20,57 +20,40 @@
20
20
  # @Create Date: Thu Jan 12 17:29:25 CST 2023
21
21
  #
22
22
 
23
- __VERSION__ = '6.5.1'
24
-
25
-
26
- def format_platform():
27
- import platform
28
- import sys
29
- from struct import calcsize
30
-
31
- def format_system():
32
- plat = platform.system().lower()
33
- plat = ('windows' if plat.startswith('cygwin') else
34
- 'linux' if plat.startswith('linux') else
35
- 'freebsd' if plat.startswith(
36
- ('freebsd', 'openbsd', 'isilon onefs')) else plat)
37
- if plat == 'linux':
38
- if hasattr(sys, 'getandroidapilevel'):
39
- plat = 'android'
40
- else:
41
- cname, cver = platform.libc_ver()
42
- if cname == 'musl':
43
- plat = 'alpine'
44
- elif cname == 'libc':
45
- plat = 'android'
46
- return plat
47
-
48
- def format_machine():
49
- mach = platform.machine().lower()
50
- arch_table = (
51
- ('x86', ('i386', 'i486', 'i586', 'i686')),
52
- ('x86_64', ('x64', 'x86_64', 'amd64', 'intel')),
53
- ('arm', ('armv5',)),
54
- ('armv6', ('armv6l',)),
55
- ('armv7', ('armv7l',)),
56
- ('aarch32', ('aarch32',)),
57
- ('aarch64', ('aarch64', 'arm64'))
58
- )
59
- for alias, archlist in arch_table:
60
- if mach in archlist:
61
- mach = alias
62
- break
63
- return mach
23
+ __VERSION__ = '6.5.2'
24
+
25
+ PLATFORM_NAMES = (
26
+ 'windows.x86_64', 'windows.x86',
27
+ 'darwin.x86_64', 'darwin.arm64',
28
+ 'linux.x86_64', 'linux.x86', 'linux.aarch64', 'linux.armv7',
29
+ 'linux.mips32el', 'linux.mips64el', 'linux.ppc64le', 'linux.riscv64',
30
+ 'alpine.x86_64', 'alpine.aarch64',
31
+ 'alpine.mips32el', 'alpine.mips64el', 'alpine.ppc64le', 'alpine.riscv64',
32
+ 'freebsd.x86_64',
33
+ 'android.x86_64', 'android.x86', 'android.aarch64', 'android.armv7',
34
+ )
35
+
36
+
37
+ def map_platform(platname):
38
+ if platname == 'darwin.aarch64':
39
+ return 'darwin.arm64'
40
+ return platname
41
+
42
+
43
+ def check_and_install_prebuilt_package():
44
+ import os
45
+ from pyarmor.cli.context import format_platform
46
+ from pyarmor.cli.bootstrap import check_prebuilt_runtime_library
47
+
48
+ plat, arch = format_platform()
49
+ platname = map_platform('%s.%s' % (plat, arch))
50
+ if platname not in PLATFORM_NAMES:
51
+ raise RuntimeError('"%s" is still not supported by Pyarmor' % platname)
64
52
 
65
- plat, mach = format_system(), format_machine()
66
- if plat == 'windows' and mach == 'x86_64':
67
- bitness = calcsize('P'.encode()) * 8
68
- if bitness == 32:
69
- mach = 'x86'
70
- elif plat == 'darwin' and mach == 'aarch64':
71
- mach = 'arm64'
53
+ if not os.path.exists(os.path.join(os.path.dirname(__file__), plat, arch)):
54
+ check_prebuilt_runtime_library([platname])
72
55
 
73
- return plat, mach
56
+ return plat, arch
74
57
 
75
58
 
76
59
  def _import_pytransform3():
@@ -80,7 +63,7 @@ def _import_pytransform3():
80
63
  fromlist=('__pyarmor__',), level=1
81
64
  )
82
65
  except ModuleNotFoundError:
83
- plat, arch = format_platform()
66
+ plat, arch = check_and_install_prebuilt_package()
84
67
  modname = '.'.join([plat, arch, 'pytransform3'])
85
68
  return __import__(
86
69
  modname, globals=globals(), locals=locals(),
@@ -20,20 +20,7 @@
20
20
  # @Create Date: Tue Jun 6 07:50:00 CST 2023
21
21
  #
22
22
 
23
- PLATFORM_NAMES = (
24
- 'windows.x86_64', 'windows.x86',
25
- 'darwin.x86_64', 'darwin.arm64',
26
- 'linux.x86_64', 'linux.x86', 'linux.aarch64', 'linux.armv7',
27
- 'alpine.x86_64', 'alpine.aarch64',
28
- 'freebsd.x86_64',
29
- 'android.x86_64', 'android.x86', 'android.aarch64', 'android.armv7',
30
- )
31
-
32
-
33
- def map_platform(platname):
34
- if platname == 'darwin.aarch64':
35
- return 'darwin.arm64'
36
- return platname
23
+ from . import map_platform
37
24
 
38
25
 
39
26
  class PyarmorRuntime(object):
@@ -55,11 +42,12 @@ class PyarmorRuntime(object):
55
42
  if parts[0] == prefix and parts[-1] in ('so', 'pyd', 'dylib'):
56
43
  return entry.name, os_path.abspath(entry.path)
57
44
 
58
- dirnames = map_platform(plat).split('.')
45
+ platname = map_platform(plat)
46
+ dirnames = platname.split('.')
59
47
  path = os_path.join(pkgpath, extra if extra else '', *dirnames)
60
48
  if not os_path.exists(path):
61
49
  from pyarmor.cli.bootstrap import check_prebuilt_runtime_library
62
- check_prebuilt_runtime_library(dirnames[:1], extra)
50
+ check_prebuilt_runtime_library([platname], extra)
63
51
 
64
52
  if os_path.exists(path):
65
53
  for entry in scandir(path):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: pyarmor.cli.core
3
- Version: 6.5.1
3
+ Version: 6.5.2
4
4
  Summary: Provide extension module pytransform3 for Pyarmor
5
5
  Home-page: https://github.com/dashingsoft/pyarmor
6
6
  Author: Jondy Zhao
@@ -15,28 +15,45 @@ Description: pyarmo.cli.core
15
15
 
16
16
  It includes prebuilt extensions support the following platforms for Python 3.7+:
17
17
 
18
- .. table::
18
+ .. table:: Supported Platforms (1)
19
19
  :widths: auto
20
20
 
21
- ======== ======== ======== ======== ======== ======== ======== ==========
22
- Arch x86_64 i686 aarch64 aarch32 armv7 armv6 Remark
23
- ======== ======== ======== ======== ======== ======== ======== ==========
24
- Darwin Y No Y No No No [#]_
25
- Linux Y Y Y (?) (?) (?) [#]_
26
- Windows Y Y (?) No No No [#]_
27
- Android Y Y Y No Y No [#]_
28
- Alpine Y (?) Y (?) (?) (?)
29
- FreeBSD Y No No No No No
30
- ======== ======== ======== ======== ======== ======== ======== ==========
21
+ ======== ======== ===== ========= ========= ======= ======= ==========
22
+ Arch x86_64 x86 aarch64 aarch32 armv7 armv6 Remark
23
+ ======== ======== ===== ========= ========= ======= ======= ==========
24
+ Darwin Y No Y No No No [#]_
25
+ Linux Y Y Y (?) (?) (?) [#]_
26
+ Windows Y Y (?) No No No [#]_
27
+ Android Y Y Y No Y No [#]_
28
+ Alpine Y (?) Y (?) (?) (?)
29
+ FreeBSD Y No No No No No
30
+ ======== ======== ===== ========= ========= ======= ======= ==========
31
+
32
+
33
+ .. table:: Supported Platforms (2) [#]_
34
+ :widths: auto
35
+
36
+ ======== ========= ============= ========= ==========
37
+ Arch ppc64le mips32/64el riscv64 Remark
38
+ ======== ========= ============= ========= ==========
39
+ Darwin No No No
40
+ Linux Y Y Y [#]_
41
+ Windows No No No
42
+ Android No No No
43
+ Alpine Y Y Y
44
+ FreeBSD No No No
45
+ ======== ========= ============= ========= ==========
31
46
 
32
47
  * Y: already available
33
48
  * No: no support plan
34
49
  * (?): not available now, maybe work in future
35
50
 
36
- .. [#] Apple Silicon only for Python 3.9+
51
+ .. [#] Apple Silicon only works for Python 3.9+
37
52
  .. [#] This is built with glibc
38
53
  .. [#] Themedia protection extensions are introduced in v3.2.3
39
54
  .. [#] All below platforms are introduced in v3.2.3
55
+ .. [#] All of these platforms are introduced in v6.5.2
56
+ .. [#] Arch riscv64 only works for Python 3.10+
40
57
 
41
58
  .. _Pyarmor: https://pypi.python.org/pypi/pyarmor/
42
59
  .. _Extension Module: https://packaging.python.org/en/latest/glossary/#term-Extension-Module
@@ -1,7 +1,7 @@
1
1
  import sys
2
2
  from setuptools import setup
3
3
 
4
- __VERSION__ = '6.5.1'
4
+ __VERSION__ = '6.5.2'
5
5
 
6
6
  with open('README.rst') as f:
7
7
  long_description = f.read()
@@ -1,34 +0,0 @@
1
- pyarmo.cli.core
2
- ===============
3
-
4
- Pyarmor_ is a command line tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.
5
-
6
- This package provides prebuilt `extension module`_ ``pytransform3`` and ``pyarmor_runtime`` required by Pyarmor_
7
-
8
- It includes prebuilt extensions support the following platforms for Python 3.7+:
9
-
10
- .. table::
11
- :widths: auto
12
-
13
- ======== ======== ======== ======== ======== ======== ======== ==========
14
- Arch x86_64 i686 aarch64 aarch32 armv7 armv6 Remark
15
- ======== ======== ======== ======== ======== ======== ======== ==========
16
- Darwin Y No Y No No No [#]_
17
- Linux Y Y Y (?) (?) (?) [#]_
18
- Windows Y Y (?) No No No [#]_
19
- Android Y Y Y No Y No [#]_
20
- Alpine Y (?) Y (?) (?) (?)
21
- FreeBSD Y No No No No No
22
- ======== ======== ======== ======== ======== ======== ======== ==========
23
-
24
- * Y: already available
25
- * No: no support plan
26
- * (?): not available now, maybe work in future
27
-
28
- .. [#] Apple Silicon only for Python 3.9+
29
- .. [#] This is built with glibc
30
- .. [#] Themedia protection extensions are introduced in v3.2.3
31
- .. [#] All below platforms are introduced in v3.2.3
32
-
33
- .. _Pyarmor: https://pypi.python.org/pypi/pyarmor/
34
- .. _Extension Module: https://packaging.python.org/en/latest/glossary/#term-Extension-Module