diff options
-rwxr-xr-x | colors.py | 8 | ||||
-rw-r--r-- | colorsc/Makefile | 8 |
2 files changed, 14 insertions, 2 deletions
@@ -39,7 +39,13 @@ except (ImportError, AttributeError): import simplejson as json # Import the C++ component of the activity. -from colorsc.colorsc import * +try: + from colorsc.colorsc import * +except: + try: + from colorsc.linux32.colorsc import * + except: + from colorsc.linux64.colorsc import * # Import PyGTK. import gobject, pygtk, gtk, pango diff --git a/colorsc/Makefile b/colorsc/Makefile index eefc014..7cc53e6 100644 --- a/colorsc/Makefile +++ b/colorsc/Makefile @@ -8,7 +8,13 @@ LDFLAGS = $(shell pkg-config --libs gdk-x11-2.0) \ $(shell pkg-config --libs pygtk-2.0) \ $(shell python-config --libs) -all: _colorsc.so +ARCH = $(shell arch | grep 64 >/dev/null && echo linux64 || echo linux32) + +all : _colorsc.so + rm -rf $(ARCH) + mkdir $(ARCH) + mv _colorsc.so colorsc.py $(ARCH)/ + touch $(ARCH)/__init__.py clean: rm -rf _colorsc.so colorsc.cpp colorsc.py colorsc.pyc *.o |