1
0
Fork 0
mirror of https://github.com/fastogt/pyfastogt synced 2025-03-09 23:38:55 +00:00

Code review

This commit is contained in:
topilski 2017-08-26 11:02:28 +03:00
parent 1058c5e269
commit 56b440ed59

View file

@ -114,7 +114,6 @@ class RedHatPlatform(Platform):
class LinuxPlatforms(SupportedPlatforms): class LinuxPlatforms(SupportedPlatforms):
def __init__(self): def __init__(self):
SupportedPlatforms.__init__(self, 'linux', [Architecture('x86_64', 64, '/usr/local'), SupportedPlatforms.__init__(self, 'linux', [Architecture('x86_64', 64, '/usr/local'),
Architecture('amd64', 64, '/usr/local'),
Architecture('i386', 32, '/usr/local'), Architecture('i386', 32, '/usr/local'),
Architecture('aarch64', 64, '/usr/local'), Architecture('aarch64', 64, '/usr/local'),
Architecture('armv7l', 32, '/usr/local'), Architecture('armv7l', 32, '/usr/local'),
@ -176,7 +175,8 @@ class FreeBSDCommonPlatform(Platform):
class FreeBSDPlatforms(SupportedPlatforms): class FreeBSDPlatforms(SupportedPlatforms):
def __init__(self): def __init__(self):
SupportedPlatforms.__init__(self, 'freebsd', [Architecture('x86_64', 64, '/usr/local')], ['TGZ']) SupportedPlatforms.__init__(self, 'freebsd', [Architecture('x86_64', 64, '/usr/local'),
Architecture('amd64', 64, '/usr/local')], ['TGZ'])
def make_platform_by_arch(self, arch, package_types) -> Platform: def make_platform_by_arch(self, arch, package_types) -> Platform:
return FreeBSDCommonPlatform(arch, package_types) return FreeBSDCommonPlatform(arch, package_types)
@ -242,10 +242,7 @@ def get_os() -> str:
def get_arch_name() -> str: def get_arch_name() -> str:
arch = platform.machine() return platform.machine()
if arch == 'AMD64':
return 'x86_64'
return arch
def get_supported_platform_by_name(platform) -> SupportedPlatforms: def get_supported_platform_by_name(platform) -> SupportedPlatforms: