From 844df531249509a474dc84dc2884c4a57ed0ffbc Mon Sep 17 00:00:00 2001 From: danx0r Date: Tue, 10 Sep 2013 14:35:54 -0700 Subject: [PATCH 1/2] search for Panda3D directly if not found --- meshtool/__main__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/meshtool/__main__.py b/meshtool/__main__.py index 2342769..2c9780f 100644 --- a/meshtool/__main__.py +++ b/meshtool/__main__.py @@ -1,4 +1,15 @@ import sys +# +# Unfortunate kluge to get to panda3d from old distribution +# this allows meshtool to run on Ubuntu 12.04 +# +try: + import panda3d +except: + print "panda3d not found -- searching harder" + sys.path.append("/usr/share/panda3d") + sys.path.append("/usr/lib64/panda3d") + import panda3d import argparse from collections import defaultdict import meshtool.filters as filters From 199b743e2ba7b3f15e2d07b55d598f0e519968d8 Mon Sep 17 00:00:00 2001 From: danx0r Date: Tue, 10 Sep 2013 14:49:22 -0700 Subject: [PATCH 2/2] print to stderr --- meshtool/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtool/__main__.py b/meshtool/__main__.py index 2c9780f..1820608 100644 --- a/meshtool/__main__.py +++ b/meshtool/__main__.py @@ -6,7 +6,7 @@ try: import panda3d except: - print "panda3d not found -- searching harder" + print >> sys.stderr, 'panda3d not found -- adding to sys.path and trying again' sys.path.append("/usr/share/panda3d") sys.path.append("/usr/lib64/panda3d") import panda3d