Skip to content

Commit 2774600

Browse files
committed
Merge branch 'release/1.10.x'
2 parents 02e6487 + 26fae21 commit 2774600

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

direct/src/showbase/Loader.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from direct.directnotify.DirectNotifyGlobal import directNotify
2626
from direct.showbase.DirectObject import DirectObject
2727
import warnings
28+
import sys
2829

2930
# You can specify a phaseChecker callback to check
3031
# a modelPath to see if it is being loaded in the correct
@@ -153,10 +154,10 @@ def _loadPythonFileTypes(cls):
153154

154155
from importlib.metadata import entry_points
155156
eps = entry_points()
156-
if isinstance(eps, dict): # Python 3.8 and 3.9
157+
if sys.version_info < (3, 10):
157158
loaders = eps.get('panda3d.loaders', ())
158159
else:
159-
loaders = entry_points().select(group='panda3d.loaders')
160+
loaders = eps.select(group='panda3d.loaders')
160161

161162
if loaders:
162163
registry = LoaderFileTypeRegistry.getGlobalPtr()

makepanda/test_wheel.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,22 @@ def test_wheel(wheel, verbose=False):
5959
if verbose:
6060
test_cmd.append("--verbose")
6161

62-
exit_code = subprocess.call(test_cmd)
62+
# Put the location of the python DLL on the path, for deploy-stub test
63+
# This is needed because venv does not install a copy of the python DLL
64+
env = None
65+
if sys.platform == "win32":
66+
deploy_libs = os.path.join(envdir, "Lib", "site-packages", "deploy_libs")
67+
if os.path.isdir(deploy_libs):
68+
# We have to do this dance because os.environ is case insensitive
69+
env = dict(os.environ)
70+
for key, value in env.items():
71+
if key.upper() == "PATH":
72+
env[key] = deploy_libs + ";" + value
73+
break
74+
else:
75+
env["PATH"] = deploy_libs
76+
77+
exit_code = subprocess.call(test_cmd, env=env)
6378
shutil.rmtree(envdir)
6479

6580
if exit_code != 0:

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ classifiers =
1818
Programming Language :: Python :: 3.9
1919
Programming Language :: Python :: 3.10
2020
Programming Language :: Python :: 3.11
21+
Programming Language :: Python :: 3.12
2122
Programming Language :: Python :: Implementation :: CPython
2223
Topic :: Games/Entertainment
2324
Topic :: Multimedia

tests/dist/test_FreezeTool.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ def test_Freezer_generateRuntimeFromStub(tmp_path, use_console):
8989
target = str(tmp_path / ('stubtest' + suffix))
9090

9191
freezer = Freezer()
92+
freezer.addModule('site', filename='site.py', text='import sys\nsys.frozen=True')
9293
freezer.addModule('module2', filename='module2.py', text='print("Module imported")')
9394
freezer.addModule('__main__', filename='main.py', text='import module2\nprint("Hello world")')
9495
assert '__main__' in freezer.modules

0 commit comments

Comments
 (0)