Ticket #43802: setup_py.diff

File setup_py.diff, 1.6 KB (added by howarth.at.macports@…, 10 years ago)

replacement setup_py.diff for pymol 1.7.1.1

  • setup.py

    old new  
    4747    pmap(_single_compile, objects)
    4848    return objects
    4949
    50 # handle extra arguments
    51 class options:
    52     osx_frameworks = False
    53 
    54 try:
    55     import argparse
    56     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 
    6250jobs = int(os.getenv('JOBS', 0))
    6351pmap = map if jobs == 1 else multiprocessing.pool.ThreadPool(jobs or None).map
    6452
     
    242230    try:
    243231        prefix_path = os.environ['PREFIX_PATH'].split(os.pathsep)
    244232    except KeyError:
    245         prefix_path = ["/usr", "/usr/X11", "/opt/local", "/sw"]
     233        prefix_path = ["@PREFIX@", "/usr", "/usr/X11"]
    246234
    247235    for prefix in prefix_path:
    248236        inc_dirs += filter(os.path.isdir, [prefix + s for s in ["/include", "/include/freetype2"]])
    249237        lib_dirs += filter(os.path.isdir, [prefix + s for s in ["/lib64", "/lib"]])
    250238
    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)
    259240
    260241    libs += ["GLEW"]
     242    pyogl_libs += ["GL", "GLU", glut]
     243
    261244    libs += pyogl_libs
    262245
    263246    ext_comp_args += ["-ffast-math", "-funroll-loops", "-O3", "-fcommon"]