Anonymous committed c24cbb4

Made modules' install names on Mac OS X more portable.

Comments (0)

Files changed (2)

 # list all language files that need to be included
 #lngFiles = glob.glob('language_data/*.bin') + glob.glob('language_data/*.fsa') + glob.glob('language_data/*.txt')
         if includePaths <> "":
                 f.write("COMPILEOPTIONSMODULES = %s\n" % (includePaths))
+        f.write("DESTDIR = $(PYTHONSITEPKGS)/%s\n" % (destDir))
         for ext in modules:
                 objs = " ".join(objs)
                 f.write(" %s\n" % (, objs))
                 f.write("\t$(LINKER) $(LINKOPTIONS) %s -o" % (objs, os.path.join("..",
+                f.write("ifeq ($(OS), Darwin)\n")
+                f.write("\tinstall_name_tool -id $(DESTDIR)/" % (, os.path.join("..",
+                f.write("endif\n")
 if __name__ == "__main__":
                 package_data = {'doc': docFiles, 'widgets': ['icons/*.png']},
                 py_modules = [ 'orngText', 'orngTextWrapper', 'textConfiguration'],
-                extra_path = ("orange-text", "orange/add-ons/Text"),
+                extra_path = ("orange-text", destDir),
                 ext_modules = modules,
 PYTHONINCLUDE = $(shell python -c "import sys; print sys.prefix+'/include/python'+sys.version[:3]")
+PYTHONLIB = $(shell python -c "import sys; print sys.prefix+'/lib/python'+sys.version[:3]")
 OS = $(shell uname)
 LINKER = g++
 ifeq ($(OS), Darwin)
-  COMPILEOPTIONS = -arch i386 -arch ppc -fPIC -fpermissive -fno-common -w -D_POSIX_C_SOURCE -O3 -I$(PYTHONINCLUDE)
+  COMPILEOPTIONS = -arch i386 -arch ppc -fPIC -fpermissive -fno-common -w -O3 -I$(PYTHONINCLUDE)
   LINKOPTIONS = -arch i386 -arch ppc -dynamiclib -headerpad_max_install_names -undefined dynamic_lookup -lstdc++
   COMPILEOPTIONS = -fPIC -fpermissive -w -O3 -I$(PYTHONINCLUDE)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.