Explorar o código

CMake: Write panda3d/dtoolconfig.py like makepanda does

rdb %!s(int64=5) %!d(string=hai) anos
pai
achega
1c6d57f92b
Modificáronse 1 ficheiros con 13 adicións e 0 borrados
  1. 13 0
      panda/CMakeLists.txt

+ 13 - 0
panda/CMakeLists.txt

@@ -129,13 +129,26 @@ To suppress this warning, upgrade to Python 3.
 
 ${win32_init}")
 
+  set(dtoolconfig_file "'''Alias of :mod:`panda3d.interrogatedb`.
+
+.. deprecated:: 1.10.0
+   This module has been renamed to :mod:`panda3d.interrogatedb`.
+'''
+
+if __debug__:
+    print(\"Warning: panda3d.dtoolconfig is deprecated, use panda3d.interrogatedb instead.\")
+from .interrogatedb import *
+")
+
   if(IS_MULTICONFIG)
     foreach(config ${CMAKE_CONFIGURATION_TYPES})
       # Generate an __init__.py in the per-configuration directory.
       file(WRITE "${PROJECT_BINARY_DIR}/${config}/panda3d/__init__.py" ${init_file})
+      file(WRITE "${PROJECT_BINARY_DIR}/${config}/panda3d/dtoolconfig.py" ${dtoolconfig_file})
     endforeach(config)
   else()
     file(WRITE "${PROJECT_BINARY_DIR}/panda3d/__init__.py" ${init_file})
+    file(WRITE "${PROJECT_BINARY_DIR}/panda3d/dtoolconfig.py" ${dtoolconfig_file})
   endif()
 
   if(HAVE_BULLET)