Ticket #43802: setup_py.diff
File setup_py.diff, 1.6 KB (added by howarth.at.macports@…, 10 years ago) |
---|
-
setup.py
old new 47 47 pmap(_single_compile, objects) 48 48 return objects 49 49 50 # handle extra arguments51 class options:52 osx_frameworks = False53 54 try:55 import argparse56 parser = argparse.ArgumentParser()57 parser.add_argument('--osx-frameworks', action="store_true")58 options, sys.argv[1:] = parser.parse_known_args(namespace=options)59 except ImportError:60 print "argparse not available"61 62 50 jobs = int(os.getenv('JOBS', 0)) 63 51 pmap = map if jobs == 1 else multiprocessing.pool.ThreadPool(jobs or None).map 64 52 … … 242 230 try: 243 231 prefix_path = os.environ['PREFIX_PATH'].split(os.pathsep) 244 232 except KeyError: 245 prefix_path = [" /usr", "/usr/X11", "/opt/local", "/sw"]233 prefix_path = ["@PREFIX@", "/usr", "/usr/X11"] 246 234 247 235 for prefix in prefix_path: 248 236 inc_dirs += filter(os.path.isdir, [prefix + s for s in ["/include", "/include/freetype2"]]) 249 237 lib_dirs += filter(os.path.isdir, [prefix + s for s in ["/lib64", "/lib"]]) 250 238 251 if sys.platform == 'darwin' and options.osx_frameworks: 252 ext_link_args += [ 253 "-framework", "OpenGL", 254 "-framework", "GLUT", 255 ] 256 else: 257 glut = posix_find_lib(['glut', 'freeglut'], lib_dirs) 258 pyogl_libs += ["GL", "GLU", glut] 239 glut = posix_find_lib(['glut', 'freeglut'], lib_dirs) 259 240 260 241 libs += ["GLEW"] 242 pyogl_libs += ["GL", "GLU", glut] 243 261 244 libs += pyogl_libs 262 245 263 246 ext_comp_args += ["-ffast-math", "-funroll-loops", "-O3", "-fcommon"]