2
0
Эх сурвалжийг харах

Merge branch 'release/1.10.x' into master

rdb 1 жил өмнө
parent
commit
957c4b9bce

+ 2 - 2
.github/workflows/ci.yml

@@ -396,12 +396,12 @@ jobs:
       if: runner.os != 'Windows'
       if: runner.os != 'Windows'
       shell: bash
       shell: bash
       run: |
       run: |
-        python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10
+        python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2
     - name: Test Python 3.13
     - name: Test Python 3.13
       if: runner.os != 'Windows'
       if: runner.os != 'Windows'
       shell: bash
       shell: bash
       run: |
       run: |
-        python -m pip install pytest setuptools
+        python -m pip install -r requirements-test.txt
         PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
         PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
 
 
     - name: Set up Python 3.12
     - name: Set up Python 3.12

+ 13 - 2
direct/src/dist/commands.py

@@ -289,6 +289,11 @@ class build_apps(setuptools.Command):
             'macosx_10_9_x86_64',
             'macosx_10_9_x86_64',
             'win_amd64',
             'win_amd64',
         ]
         ]
+
+        if sys.version_info >= (3, 13):
+            # This version of Python is only available for 10.13+.
+            self.platforms[1] = 'macosx_10_13_x86_64'
+
         self.plugins = []
         self.plugins = []
         self.embed_prc_data = True
         self.embed_prc_data = True
         self.extra_prc_files = []
         self.extra_prc_files = []
@@ -646,14 +651,20 @@ class build_apps(setuptools.Command):
             subprocess.check_call([sys.executable, '-m', 'pip'] + pip_args)
             subprocess.check_call([sys.executable, '-m', 'pip'] + pip_args)
         except:
         except:
             # Display a more helpful message for these common issues.
             # Display a more helpful message for these common issues.
-            if platform.startswith('manylinux2010_') and sys.version_info >= (3, 11):
+            if platform.startswith('macosx_10_9_') and sys.version_info >= (3, 13):
+                new_platform = platform.replace('macosx_10_9_', 'macosx_10_13_')
+                self.announce('This error likely occurs because {} is not a supported target as of Python 3.13.\nChange the target platform to {} instead.'.format(platform, new_platform), distutils.log.ERROR)
+            elif platform.startswith('manylinux2010_') and sys.version_info >= (3, 11):
                 new_platform = platform.replace('manylinux2010_', 'manylinux2014_')
                 new_platform = platform.replace('manylinux2010_', 'manylinux2014_')
                 self.announce('This error likely occurs because {} is not a supported target as of Python 3.11.\nChange the target platform to {} instead.'.format(platform, new_platform), distutils.log.ERROR)
                 self.announce('This error likely occurs because {} is not a supported target as of Python 3.11.\nChange the target platform to {} instead.'.format(platform, new_platform), distutils.log.ERROR)
             elif platform.startswith('manylinux1_') and sys.version_info >= (3, 10):
             elif platform.startswith('manylinux1_') and sys.version_info >= (3, 10):
                 new_platform = platform.replace('manylinux1_', 'manylinux2014_')
                 new_platform = platform.replace('manylinux1_', 'manylinux2014_')
                 self.announce('This error likely occurs because {} is not a supported target as of Python 3.10.\nChange the target platform to {} instead.'.format(platform, new_platform), distutils.log.ERROR)
                 self.announce('This error likely occurs because {} is not a supported target as of Python 3.10.\nChange the target platform to {} instead.'.format(platform, new_platform), distutils.log.ERROR)
             elif platform.startswith('macosx_10_6_') and sys.version_info >= (3, 8):
             elif platform.startswith('macosx_10_6_') and sys.version_info >= (3, 8):
-                new_platform = platform.replace('macosx_10_6_', 'macosx_10_9_')
+                if sys.version_info >= (3, 13):
+                    new_platform = platform.replace('macosx_10_6_', 'macosx_10_13_')
+                else:
+                    new_platform = platform.replace('macosx_10_6_', 'macosx_10_9_')
                 self.announce('This error likely occurs because {} is not a supported target as of Python 3.8.\nChange the target platform to {} instead.'.format(platform, new_platform), distutils.log.ERROR)
                 self.announce('This error likely occurs because {} is not a supported target as of Python 3.8.\nChange the target platform to {} instead.'.format(platform, new_platform), distutils.log.ERROR)
             raise
             raise
 
 

+ 12 - 0
makepanda/installer.nsi

@@ -380,6 +380,7 @@ SectionGroup "Python modules" SecGroupPython
         !insertmacro PyBindingSection 3.11-32 .cp311-win32.pyd
         !insertmacro PyBindingSection 3.11-32 .cp311-win32.pyd
         !insertmacro PyBindingSection 3.12-32 .cp312-win32.pyd
         !insertmacro PyBindingSection 3.12-32 .cp312-win32.pyd
         !insertmacro PyBindingSection 3.13-32 .cp313-win32.pyd
         !insertmacro PyBindingSection 3.13-32 .cp313-win32.pyd
+        !insertmacro PyBindingSection 3.14-32 .cp314-win32.pyd
     !else
     !else
         !insertmacro PyBindingSection 3.5 .cp35-win_amd64.pyd
         !insertmacro PyBindingSection 3.5 .cp35-win_amd64.pyd
         !insertmacro PyBindingSection 3.6 .cp36-win_amd64.pyd
         !insertmacro PyBindingSection 3.6 .cp36-win_amd64.pyd
@@ -390,6 +391,7 @@ SectionGroup "Python modules" SecGroupPython
         !insertmacro PyBindingSection 3.11 .cp311-win_amd64.pyd
         !insertmacro PyBindingSection 3.11 .cp311-win_amd64.pyd
         !insertmacro PyBindingSection 3.12 .cp312-win_amd64.pyd
         !insertmacro PyBindingSection 3.12 .cp312-win_amd64.pyd
         !insertmacro PyBindingSection 3.13 .cp313-win_amd64.pyd
         !insertmacro PyBindingSection 3.13 .cp313-win_amd64.pyd
+        !insertmacro PyBindingSection 3.14 .cp314-win_amd64.pyd
     !endif
     !endif
 SectionGroupEnd
 SectionGroupEnd
 
 
@@ -501,6 +503,7 @@ Function .onInit
         !insertmacro MaybeEnablePyBindingSection 3.11-32
         !insertmacro MaybeEnablePyBindingSection 3.11-32
         !insertmacro MaybeEnablePyBindingSection 3.12-32
         !insertmacro MaybeEnablePyBindingSection 3.12-32
         !insertmacro MaybeEnablePyBindingSection 3.13-32
         !insertmacro MaybeEnablePyBindingSection 3.13-32
+        !insertmacro MaybeEnablePyBindingSection 3.14-32
         ${EndIf}
         ${EndIf}
     !else
     !else
         !insertmacro MaybeEnablePyBindingSection 3.5
         !insertmacro MaybeEnablePyBindingSection 3.5
@@ -513,6 +516,7 @@ Function .onInit
         !insertmacro MaybeEnablePyBindingSection 3.11
         !insertmacro MaybeEnablePyBindingSection 3.11
         !insertmacro MaybeEnablePyBindingSection 3.12
         !insertmacro MaybeEnablePyBindingSection 3.12
         !insertmacro MaybeEnablePyBindingSection 3.13
         !insertmacro MaybeEnablePyBindingSection 3.13
+        !insertmacro MaybeEnablePyBindingSection 3.14
         ${EndIf}
         ${EndIf}
     !endif
     !endif
 
 
@@ -538,6 +542,10 @@ Function .onInit
         SectionSetFlags ${SecPyBindings3.13} ${SF_RO}
         SectionSetFlags ${SecPyBindings3.13} ${SF_RO}
         SectionSetInstTypes ${SecPyBindings3.13} 0
         SectionSetInstTypes ${SecPyBindings3.13} 0
     !endif
     !endif
+    !ifdef SecPyBindings3.14
+        SectionSetFlags ${SecPyBindings3.14} ${SF_RO}
+        SectionSetInstTypes ${SecPyBindings3.14} 0
+    !endif
     ${EndUnless}
     ${EndUnless}
 FunctionEnd
 FunctionEnd
 
 
@@ -842,6 +850,7 @@ Section Uninstall
         !insertmacro RemovePythonPath 3.11-32
         !insertmacro RemovePythonPath 3.11-32
         !insertmacro RemovePythonPath 3.12-32
         !insertmacro RemovePythonPath 3.12-32
         !insertmacro RemovePythonPath 3.13-32
         !insertmacro RemovePythonPath 3.13-32
+        !insertmacro RemovePythonPath 3.14-32
     !else
     !else
         !insertmacro RemovePythonPath 3.5
         !insertmacro RemovePythonPath 3.5
         !insertmacro RemovePythonPath 3.6
         !insertmacro RemovePythonPath 3.6
@@ -852,6 +861,7 @@ Section Uninstall
         !insertmacro RemovePythonPath 3.11
         !insertmacro RemovePythonPath 3.11
         !insertmacro RemovePythonPath 3.12
         !insertmacro RemovePythonPath 3.12
         !insertmacro RemovePythonPath 3.13
         !insertmacro RemovePythonPath 3.13
+        !insertmacro RemovePythonPath 3.14
     !endif
     !endif
 
 
     SetDetailsPrint both
     SetDetailsPrint both
@@ -923,6 +933,7 @@ SectionEnd
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.11-32} $(DESC_SecPyBindings3.11-32)
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.11-32} $(DESC_SecPyBindings3.11-32)
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.12-32} $(DESC_SecPyBindings3.12-32)
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.12-32} $(DESC_SecPyBindings3.12-32)
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.13-32} $(DESC_SecPyBindings3.13-32)
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.13-32} $(DESC_SecPyBindings3.13-32)
+    !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.14-32} $(DESC_SecPyBindings3.14-32)
   !else
   !else
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.5} $(DESC_SecPyBindings3.5)
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.5} $(DESC_SecPyBindings3.5)
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.6} $(DESC_SecPyBindings3.6)
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.6} $(DESC_SecPyBindings3.6)
@@ -933,6 +944,7 @@ SectionEnd
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.11} $(DESC_SecPyBindings3.11)
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.11} $(DESC_SecPyBindings3.11)
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.12} $(DESC_SecPyBindings3.12)
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.12} $(DESC_SecPyBindings3.12)
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.13} $(DESC_SecPyBindings3.13)
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.13} $(DESC_SecPyBindings3.13)
+    !insertmacro MUI_DESCRIPTION_TEXT ${SecPyBindings3.14} $(DESC_SecPyBindings3.14)
   !endif
   !endif
   !ifdef INCLUDE_PYVER
   !ifdef INCLUDE_PYVER
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPython} $(DESC_SecPython)
     !insertmacro MUI_DESCRIPTION_TEXT ${SecPython} $(DESC_SecPython)

+ 1 - 1
makepanda/makepandacore.py

@@ -2128,7 +2128,7 @@ def SdkLocatePython(prefer_thirdparty_python=False):
 
 
         gil_disabled = locations.get_config_var("Py_GIL_DISABLED")
         gil_disabled = locations.get_config_var("Py_GIL_DISABLED")
         if gil_disabled and int(gil_disabled):
         if gil_disabled and int(gil_disabled):
-            SDK["PYTHONEXEC"] += "3.13t"
+            SDK["PYTHONEXEC"] += "%d.%dt" % sys.version_info[:2]
             abiflags = "t"
             abiflags = "t"
             DefSymbol("PYTHON", "Py_GIL_DISABLED", "1")
             DefSymbol("PYTHON", "Py_GIL_DISABLED", "1")
         else:
         else:

+ 9 - 1
tests/dist/test_FreezeTool.py

@@ -103,5 +103,13 @@ def test_Freezer_generateRuntimeFromStub(tmp_path, use_console):
         # Not supported; see #1348
         # Not supported; see #1348
         return
         return
 
 
-    output = subprocess.check_output(target)
+    env = None
+    if sys.platform == "win32":
+        env = dict(os.environ)
+        if not os.environ.get('PATH'):
+            env['PATH'] = bin_dir
+        else:
+            env['PATH'] = bin_dir + os.pathsep + os.environ['PATH']
+
+    output = subprocess.check_output(target, env=env)
     assert output.replace(b'\r\n', b'\n') == b'Module imported\nHello world\n'
     assert output.replace(b'\r\n', b'\n') == b'Module imported\nHello world\n'