pyarmor.cli.core 6.5.2__zip → 7.6.0__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.2
3
+ Version: 7.6.0
4
4
  Summary: Provide extension module pytransform3 for Pyarmor
5
5
  Home-page: https://github.com/dashingsoft/pyarmor
6
6
  Author: Jondy Zhao
@@ -20,10 +20,10 @@
20
20
  # @Create Date: Thu Jan 12 17:29:25 CST 2023
21
21
  #
22
22
 
23
- __VERSION__ = '6.5.2'
23
+ __VERSION__ = '7.6.0'
24
24
 
25
25
  PLATFORM_NAMES = (
26
- 'windows.x86_64', 'windows.x86',
26
+ 'windows.x86_64', 'windows.x86', 'cygwin.x86_64',
27
27
  'darwin.x86_64', 'darwin.arm64',
28
28
  'linux.x86_64', 'linux.x86', 'linux.aarch64', 'linux.armv7',
29
29
  'linux.mips32el', 'linux.mips64el', 'linux.ppc64le', 'linux.riscv64',
@@ -37,6 +37,8 @@ PLATFORM_NAMES = (
37
37
  def map_platform(platname):
38
38
  if platname == 'darwin.aarch64':
39
39
  return 'darwin.arm64'
40
+ if platname.startswith('musl.'):
41
+ return '.'.join('alpine', platname[5:])
40
42
  return platname
41
43
 
42
44
 
@@ -44,12 +46,16 @@ def check_and_install_prebuilt_package():
44
46
  import os
45
47
  from pyarmor.cli.context import format_platform
46
48
  from pyarmor.cli.bootstrap import check_prebuilt_runtime_library
49
+ from platform import system, machine
47
50
 
48
- plat, arch = format_platform()
49
- platname = map_platform('%s.%s' % (plat, arch))
51
+ platname = os.getenv(
52
+ 'PYARMOR_PLATFORM',
53
+ format_platform(system().lower(), machine().lower()))
54
+ platname = map_platform(platname)
50
55
  if platname not in PLATFORM_NAMES:
51
56
  raise RuntimeError('"%s" is still not supported by Pyarmor' % platname)
52
57
 
58
+ plat, arch = platname.split('.')
53
59
  if not os.path.exists(os.path.join(os.path.dirname(__file__), plat, arch)):
54
60
  check_prebuilt_runtime_library([platname])
55
61
 
@@ -29,6 +29,7 @@ class PyarmorRuntime(object):
29
29
  def get(plat, extra=None, native=True):
30
30
  from os import scandir, path as os_path
31
31
  prefix = 'pyarmor_runtime'
32
+ extlist = 'so', 'pyd', 'dylib', 'dll'
32
33
 
33
34
  # Themida is only available for windows
34
35
  if extra == 'themida' and not plat.startswith('windows'):
@@ -39,7 +40,7 @@ class PyarmorRuntime(object):
39
40
  path = pkgpath
40
41
  for entry in scandir(path):
41
42
  parts = entry.name.split('.')
42
- if parts[0] == prefix and parts[-1] in ('so', 'pyd', 'dylib'):
43
+ if parts[0] == prefix and parts[-1] in extlist:
43
44
  return entry.name, os_path.abspath(entry.path)
44
45
 
45
46
  platname = map_platform(plat)
@@ -52,7 +53,7 @@ class PyarmorRuntime(object):
52
53
  if os_path.exists(path):
53
54
  for entry in scandir(path):
54
55
  parts = entry.name.split('.')
55
- if parts[0] == prefix and parts[-1] in ('so', 'pyd', 'dylib'):
56
+ if parts[0] == prefix and parts[-1] in extlist:
56
57
  return entry.name, os_path.abspath(entry.path)
57
58
 
58
59
  # Fallback to pyarmor.cli.runtime
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.1
2
2
  Name: pyarmor.cli.core
3
- Version: 6.5.2
3
+ Version: 7.6.0
4
4
  Summary: Provide extension module pytransform3 for Pyarmor
5
5
  Home-page: https://github.com/dashingsoft/pyarmor
6
6
  Author: Jondy Zhao
@@ -1,7 +1,7 @@
1
1
  import sys
2
2
  from setuptools import setup
3
3
 
4
- __VERSION__ = '6.5.2'
4
+ __VERSION__ = '7.6.0'
5
5
 
6
6
  with open('README.rst') as f:
7
7
  long_description = f.read()