Merge branch 'release/1.10.x'

This commit is contained in:
rdb 2023-10-15 23:02:47 +02:00
commit 277460061e
4 changed files with 21 additions and 3 deletions

View File

@ -25,6 +25,7 @@ from panda3d.core import Loader as PandaLoader
from direct.directnotify.DirectNotifyGlobal import directNotify
from direct.showbase.DirectObject import DirectObject
import warnings
import sys
# You can specify a phaseChecker callback to check
# a modelPath to see if it is being loaded in the correct
@ -153,10 +154,10 @@ class Loader(DirectObject):
from importlib.metadata import entry_points
eps = entry_points()
if isinstance(eps, dict): # Python 3.8 and 3.9
if sys.version_info < (3, 10):
loaders = eps.get('panda3d.loaders', ())
else:
loaders = entry_points().select(group='panda3d.loaders')
loaders = eps.select(group='panda3d.loaders')
if loaders:
registry = LoaderFileTypeRegistry.getGlobalPtr()

View File

@ -59,7 +59,22 @@ def test_wheel(wheel, verbose=False):
if verbose:
test_cmd.append("--verbose")
exit_code = subprocess.call(test_cmd)
# Put the location of the python DLL on the path, for deploy-stub test
# This is needed because venv does not install a copy of the python DLL
env = None
if sys.platform == "win32":
deploy_libs = os.path.join(envdir, "Lib", "site-packages", "deploy_libs")
if os.path.isdir(deploy_libs):
# We have to do this dance because os.environ is case insensitive
env = dict(os.environ)
for key, value in env.items():
if key.upper() == "PATH":
env[key] = deploy_libs + ";" + value
break
else:
env["PATH"] = deploy_libs
exit_code = subprocess.call(test_cmd, env=env)
shutil.rmtree(envdir)
if exit_code != 0:

View File

@ -18,6 +18,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: Implementation :: CPython
Topic :: Games/Entertainment
Topic :: Multimedia

View File

@ -89,6 +89,7 @@ def test_Freezer_generateRuntimeFromStub(tmp_path, use_console):
target = str(tmp_path / ('stubtest' + suffix))
freezer = Freezer()
freezer.addModule('site', filename='site.py', text='import sys\nsys.frozen=True')
freezer.addModule('module2', filename='module2.py', text='print("Module imported")')
freezer.addModule('__main__', filename='main.py', text='import module2\nprint("Hello world")')
assert '__main__' in freezer.modules