Ticket #38516: setup_py.diff
File setup_py.diff, 1.6 KB (added by howarth@…, 11 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 = 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 … … 246 234 try: 247 235 prefix_path = os.environ['PREFIX_PATH'].split(os.pathsep) 248 236 except KeyError: 249 prefix_path = [" /usr", "/usr/X11", "/opt/local", "/sw"]237 prefix_path = ["@PREFIX@", "/usr", "/usr/X11"] 250 238 251 239 for prefix in prefix_path: 252 240 inc_dirs += filter(os.path.isdir, [prefix + s for s in ["/include", "/include/freetype2"]]) 253 241 lib_dirs += filter(os.path.isdir, [prefix + s for s in ["/lib64", "/lib"]]) 254 242 255 if sys.platform == 'darwin' and options.osx_frameworks: 256 ext_link_args += [ 257 "-framework", "OpenGL", 258 "-framework", "GLUT", 259 ] 260 else: 261 glut = posix_find_lib(['glut', 'freeglut'], lib_dirs) 262 pyogl_libs += ["GL", "GLU", glut] 243 glut = posix_find_lib(['glut', 'freeglut'], lib_dirs) 263 244 264 245 libs += ["GLEW"] 246 pyogl_libs += ["GL", "GLU", glut] 247 265 248 libs += pyogl_libs 266 249 267 250 ext_comp_args += ["-ffast-math", "-funroll-loops", "-O3", "-fcommon"]