From af18bfd18d326a124e219cd8c00723eb7df000b1 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 30 Mar 2015 00:21:31 +0200 Subject: [PATCH] Fix makepanda, squelch libpandaexpress import error --- direct/src/extensions_native/extension_native_helpers.py | 9 ++++----- makepanda/makepanda.py | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/direct/src/extensions_native/extension_native_helpers.py b/direct/src/extensions_native/extension_native_helpers.py index 961f8f8636..9424b640ce 100644 --- a/direct/src/extensions_native/extension_native_helpers.py +++ b/direct/src/extensions_native/extension_native_helpers.py @@ -107,14 +107,13 @@ def Dtool_PreloadDLL(module): # Dtool_FindModule to find our panda3d.core module. However, we # should be able to import it. To differentiate the old-style Panda # build (with .dll's) from the new-style Panda build (with .pyd's), we -# first try to import libpandaexpress directly; if it succeeds we're -# in an old-style build, and if it fails we must be in a new-style -# build. +# first try to import panda3d.core directly; if it succeeds we're in a +# new-style build, and if it fails we must be in an old-style build. try: + from panda3d.core import * +except ImportError: Dtool_PreloadDLL("libpandaexpress") from libpandaexpress import * -except ImportError: - from panda3d.core import * def Dtool_ObjectToDict(cls, name, obj): cls.DtoolClassDict[name] = obj; diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 628635b679..9d8aa0cab6 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -238,7 +238,7 @@ def parseopts(args): if option == "--use-" + pkg.lower(): PkgEnable(pkg) break - elif option == "--use-" + pkg.lower(): + elif option == "--no-" + pkg.lower(): PkgDisable(pkg) break elif option == "--" + pkg.lower() + "-incdir":