当前位置: 首页>>代码示例>>Python>>正文


Python PandaSystem.get_minor_version方法代码示例

本文整理汇总了Python中panda3d.core.PandaSystem.get_minor_version方法的典型用法代码示例。如果您正苦于以下问题:Python PandaSystem.get_minor_version方法的具体用法?Python PandaSystem.get_minor_version怎么用?Python PandaSystem.get_minor_version使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在panda3d.core.PandaSystem的用法示例。


在下文中一共展示了PandaSystem.get_minor_version方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: interrogate

# 需要导入模块: from panda3d.core import PandaSystem [as 别名]
# 或者: from panda3d.core.PandaSystem import get_minor_version [as 别名]
def interrogate():
    """ Runs interrogate over the source directory """

    # Collect source files and convert them to a relative path
    all_sources = find_sources(".")

    # Create the interrogate command
    cmd = [join(get_panda_bin_path(), 'interrogate')]

    if VERBOSE_LVL == 1:
        cmd += ["-v"]
    elif VERBOSE_LVL == 2:
        cmd += ["-vv"]

    cmd += ["-fnames", "-string", "-refcount", "-assert", "-python-native"]
    cmd += ["-S" + get_panda_include_path() + "/parser-inc"]
    cmd += ["-S" + get_panda_include_path() + "/"]

    # Add all subdirectories
    for pth in listdir("."):
        if isdir(pth):
            cmd += ["-I" + pth]

    cmd += ["-srcdir", "."]
    cmd += ["-oc", "interrogate_wrapper.cpp"]
    cmd += ["-od", "interrogate.in"]
    cmd += ["-module", MODULE_NAME]
    cmd += ["-library", MODULE_NAME]

    if PandaSystem.get_major_version() > 1 or PandaSystem.get_minor_version() > 9:
        # Add nomangle option, but only for recent builds
        cmd += ["-nomangle"]

    if PandaSystem.get_major_version() == 1 and PandaSystem.get_minor_version() < 10:
        # Old interrogate options cant handle volatile
        cmd += ["-Dvolatile="]

    # Defines required to parse the panda source
    defines = ["INTERROGATE", "CPPPARSER", "__STDC__=1", "__cplusplus=201103L"]

    if get_compiler_name() == "MSC":
        defines += ["__inline", "_X86_", "WIN32_VC", "WIN32", "_WIN32"]
        if is_64_bit():
            defines += ["WIN64_VC", "WIN64", "_WIN64"]
        # NOTE: this 1600 value is the version number for VC2010.
        defines += ["_MSC_VER=1600", '"__declspec(param)="', "__cdecl", "_near",
                    "_far", "__near", "__far", "__stdcall"]

    if get_compiler_name() == "GCC":
        defines += ['__attribute__\(x\)=']
        if is_64_bit():
            defines += ['_LP64']
        else:
            defines += ['__i386__']

    for define in defines:
        cmd += ["-D" + define]

    cmd += all_sources
    try_execute(*cmd, verbose=VERBOSE_LVL != 0)
开发者ID:tobspr,项目名称:P3DModuleBuilder,代码行数:62,代码来源:interrogate.py

示例2: interrogate_module

# 需要导入模块: from panda3d.core import PandaSystem [as 别名]
# 或者: from panda3d.core.PandaSystem import get_minor_version [as 别名]
def interrogate_module():
    """ Runs the interrogate module command """

    # Create module command
    cmd = [join_abs(get_panda_bin_path(), "interrogate_module")]
    cmd += ["-python-native"]

    if PandaSystem.get_major_version() > 1 or PandaSystem.get_minor_version() > 9:
        # Older panda3d versions don't have this
        cmd += ["-import", "panda3d.core"]

    cmd += ["-module", MODULE_NAME]
    cmd += ["-library", MODULE_NAME]
    cmd += ["-oc", "interrogate_module.cpp"]
    cmd += ["interrogate.in"]

    try_execute(*cmd, verbose=VERBOSE_LVL != 0)
开发者ID:tobspr,项目名称:P3DModuleBuilder,代码行数:19,代码来源:interrogate.py

示例3: run_cmake

# 需要导入模块: from panda3d.core import PandaSystem [as 别名]
# 或者: from panda3d.core.PandaSystem import get_minor_version [as 别名]
def run_cmake(config, args):
    """ Runs cmake in the output dir """

    configuration = "Release"
    if config["generate_pdb"].lower() in ["1", "true", "yes", "y"]:
        configuration = "RelWithDebInfo"

    cmake_args = ["-DCMAKE_BUILD_TYPE=" + configuration]
    cmake_args += ["-DPYTHON_EXECUTABLE:STRING=" + sys.executable]
    cmake_args += ["-DPROJECT_NAME:STRING=" + config["module_name"]]

    lib_prefix = "lib" if is_windows() else ""

    # Check for the right interrogate lib
    if PandaSystem.get_major_version() > 1 or PandaSystem.get_minor_version() > 9:
        cmake_args += ["-DINTERROGATE_LIB:STRING=" + lib_prefix + "p3interrogatedb"]
    else:

        # Buildbot versions do not have the core lib, instead try using libpanda
        if not isfile(join_abs(get_panda_lib_path(), "core.lib")):
            cmake_args += ["-DINTERROGATE_LIB:STRING=" + lib_prefix + "panda"]
        else:
            cmake_args += ["-DINTERROGATE_LIB:STRING=core"]

    if is_windows():
        # Specify 64-bit compiler when using a 64 bit panda sdk build
        bit_suffix = " Win64" if is_64_bit() else ""
        cmake_args += ["-G" + config["vc_version"] + bit_suffix]

    # Specify python version, once as integer, once seperated by a dot
    pyver = "{}{}".format(sys.version_info.major, sys.version_info.minor)
    pyver_dot = "{}.{}".format(sys.version_info.major, sys.version_info.minor)

    if is_windows():
        cmake_args += ["-DPYTHONVER:STRING=" + pyver]

    if is_linux():
        cmake_args += ["-DPYTHONVERDOT:STRING=" + pyver_dot]

    # Libraries
    for lib in ["freetype", "bullet", "eigen"]:
        if "use_lib_" + lib in config and config["use_lib_" + lib] in ["1", "yes", "y"]:
            cmake_args += ["-DUSE_LIB_" + lib.upper() + "=TRUE"]

    # Optimization level
    optimize = 3
    if args.optimize is None:
        # No optimization level set. Try to find it in the config
        if "optimize" in config:
            optimize = config["optimize"]
    else:
        optimize = args.optimize

    # Verbose level
    if "verbose_igate" in config:
        cmake_args += ["-DIGATE_VERBOSE=" + str(config["verbose_igate"])]
    else:
        cmake_args += ["-DIGATE_VERBOSE=0"]

    cmake_args += ["-DOPTIMIZE=" + str(optimize)]

    try_execute("cmake", join_abs(get_script_dir(), ".."), *cmake_args)
开发者ID:tobspr,项目名称:P3DModuleBuilder,代码行数:64,代码来源:setup.py


注:本文中的panda3d.core.PandaSystem.get_minor_version方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。