Skip to content

Commit 9da7988

Browse files
committed
CMake: fix pandac/PandaModules.py to match makepanda's
1 parent 921cbc6 commit 9da7988

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

direct/CMakeLists.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ if(HAVE_PYTHON)
5353
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pandac/PandaModules.py"
5454
"\"This module is deprecated. Import from panda3d.core and other panda3d.* modules instead.\"
5555
56-
print(\"Warning: pandac.PandaModules is deprecated, import from panda3d.core instead\")\n")
56+
if __debug__:
57+
print(\"Warning: pandac.PandaModules is deprecated, import from panda3d.core instead\")\n")
5758

5859
foreach(module ${ALL_INTERROGATE_MODULES})
5960
string(REGEX REPLACE "^.*\\." "" module_name "${module}")
@@ -66,6 +67,19 @@ except ImportError as err:
6667
")
6768
endforeach()
6869

70+
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/pandac/PandaModules.py"
71+
"from direct.showbase import DConfig
72+
73+
def get_config_showbase():
74+
return DConfig
75+
76+
def get_config_express():
77+
return DConfig
78+
79+
getConfigShowbase = get_config_showbase
80+
getConfigExpress = get_config_express
81+
")
82+
6983
# Now install ourselves:
7084
install_python_package(pandac SOURCE "${CMAKE_CURRENT_BINARY_DIR}/pandac" LIB COMPONENT Direct)
7185
endif()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy