Browse Source

dist: Remove version checks for Python versions before 3.5

rdb 5 years ago
parent
commit
6c3e13d19d
2 changed files with 2 additions and 20 deletions
  1. 1 16
      direct/src/dist/commands.py
  2. 1 4
      direct/src/dist/pefile.py

+ 1 - 16
direct/src/dist/commands.py

@@ -28,16 +28,6 @@ from .icon import Icon
 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):
     if isinstance(input, str):
         input = input.strip().replace(',', '\n')
@@ -214,7 +204,7 @@ class build_apps(setuptools.Command):
             'oleaut32.dll', 'gdiplus.dll', 'winmm.dll', 'iphlpapi.dll',
             'msvcrt.dll', 'kernelbase.dll', 'msimg32.dll', 'msacm32.dll',
             'setupapi.dll', 'version.dll', 'userenv.dll', 'netapi32.dll',
-            'crypt32.dll',
+            'crypt32.dll', 'bcrypt.dll',
 
             # manylinux1/linux
             'libdl.so.*', 'libstdc++.so.*', 'libm.so.*', 'libgcc_s.so.*',
@@ -269,11 +259,6 @@ class build_apps(setuptools.Command):
             '/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.hidden_imports = {}
 

+ 1 - 4
direct/src/dist/pefile.py

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