Ticket #42860: setup_py.diff
File setup_py.diff, 1.5 KB (added by mtiberti (Matteo Tiberti), 11 years ago) |
---|
-
setup.py
51 51 class options: 52 52 osx_frameworks = False 53 53 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 54 jobs = int(os.getenv('JOBS', 0)) 63 55 pmap = map if jobs == 1 else multiprocessing.pool.ThreadPool(jobs or None).map 64 56 … … 242 234 try: 243 235 prefix_path = os.environ['PREFIX_PATH'].split(os.pathsep) 244 236 except KeyError: 245 prefix_path = ["/ usr", "/usr/X11", "/opt/local", "/sw"]237 prefix_path = ["/opt/local", "/usr", "/usr/X11"] 246 238 247 239 for prefix in prefix_path: 248 240 inc_dirs += filter(os.path.isdir, [prefix + s for s in ["/include", "/include/freetype2"]]) 249 241 lib_dirs += filter(os.path.isdir, [prefix + s for s in ["/lib64", "/lib"]]) 250 242 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] 243 glut = posix_find_lib(['glut', 'freeglut'], lib_dirs) 259 244 260 245 libs += ["GLEW"] 246 pyogl_libs += ["GL", "GLU", glut] 261 247 libs += pyogl_libs 262 248 263 249 ext_comp_args += ["-ffast-math", "-funroll-loops", "-O3", "-fcommon"]