Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcolors.py8
-rw-r--r--colorsc/Makefile8
2 files changed, 14 insertions, 2 deletions
diff --git a/colors.py b/colors.py
index 457888a..f9984cb 100755
--- a/colors.py
+++ b/colors.py
@@ -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