dist: Remove version checks for Python versions before 3.5

This commit is contained in:
rdb 2020-12-29 14:50:41 +01:00
parent 41f67bbe1f
commit 6c3e13d19d
2 changed files with 2 additions and 20 deletions

View File

@ -28,16 +28,6 @@ from .icon import Icon
import panda3d.core as p3d import panda3d.core as p3d
if sys.version_info < (3, 0):
# Warn the user. They might be using Python 2 by accident.
print("=================================================================")
print("WARNING: You are using Python 2, which has reached the end of its")
print("WARNING: life as of January 1, 2020. Please upgrade to Python 3.")
print("=================================================================")
sys.stdout.flush()
time.sleep(4.0)
def _parse_list(input): def _parse_list(input):
if isinstance(input, str): if isinstance(input, str):
input = input.strip().replace(',', '\n') input = input.strip().replace(',', '\n')
@ -214,7 +204,7 @@ class build_apps(setuptools.Command):
'oleaut32.dll', 'gdiplus.dll', 'winmm.dll', 'iphlpapi.dll', 'oleaut32.dll', 'gdiplus.dll', 'winmm.dll', 'iphlpapi.dll',
'msvcrt.dll', 'kernelbase.dll', 'msimg32.dll', 'msacm32.dll', 'msvcrt.dll', 'kernelbase.dll', 'msimg32.dll', 'msacm32.dll',
'setupapi.dll', 'version.dll', 'userenv.dll', 'netapi32.dll', 'setupapi.dll', 'version.dll', 'userenv.dll', 'netapi32.dll',
'crypt32.dll', 'crypt32.dll', 'bcrypt.dll',
# manylinux1/linux # manylinux1/linux
'libdl.so.*', 'libstdc++.so.*', 'libm.so.*', 'libgcc_s.so.*', 'libdl.so.*', 'libstdc++.so.*', 'libm.so.*', 'libgcc_s.so.*',
@ -269,11 +259,6 @@ class build_apps(setuptools.Command):
'/System/Library/**', '/System/Library/**',
] ]
if sys.version_info >= (3, 5):
# Python 3.5+ requires at least Windows Vista to run anyway, so we
# shouldn't warn about DLLs that are shipped with Vista.
self.exclude_dependencies += ['bcrypt.dll']
self.package_data_dirs = {} self.package_data_dirs = {}
self.hidden_imports = {} self.hidden_imports = {}

View File

@ -242,10 +242,7 @@ class VersionInfoResource(object):
length, value_length = unpack('<HH', data[0:4]) length, value_length = unpack('<HH', data[0:4])
offset = 40 + value_length + (value_length & 1) offset = 40 + value_length + (value_length & 1)
dwords = array('I') dwords = array('I')
if sys.version_info >= (3, 2):
dwords.frombytes(bytes(data[40:offset])) dwords.frombytes(bytes(data[40:offset]))
else:
dwords.fromstring(bytes(data[40:offset]))
if len(dwords) > 0: if len(dwords) > 0:
self.signature = dwords[0] self.signature = dwords[0]