setup.py (pymol-v2.1.0.tar.bz2) | : | setup.py (pymol-open-source-2.2.0) | ||
---|---|---|---|---|
skipping to change at line 227 | skipping to change at line 227 | |||
pass | pass | |||
try: | try: | |||
pymol_file = '%~dp0\\' + os.path.relpath(pymol_file, self.in stall_scripts) | pymol_file = '%~dp0\\' + os.path.relpath(pymol_file, self.in stall_scripts) | |||
except ValueError: | except ValueError: | |||
pymol_file = os.path.abspath(pymol_file) | pymol_file = os.path.abspath(pymol_file) | |||
# out.write('set PYMOL_PATH=' + pymol_path + os.linesep) | # out.write('set PYMOL_PATH=' + pymol_path + os.linesep) | |||
out.write('"%s" "%s"' % (python_exe, pymol_file)) | out.write('"%s" "%s"' % (python_exe, pymol_file)) | |||
out.write(' %*' + os.linesep) | out.write(' %*' + os.linesep) | |||
else: | else: | |||
out.write('#!/bin/bash' + os.linesep) | out.write('#!/bin/sh' + os.linesep) | |||
if sys.platform.startswith('darwin'): | if sys.platform.startswith('darwin'): | |||
out.write('[ "$DISPLAY" == "" ] && export DISPLAY=":0.0"' + os.linesep) | out.write('[ "$DISPLAY" == "" ] && export DISPLAY=":0.0"' + os.linesep) | |||
out.write('export PYMOL_PATH="%s"' % pymol_path + os.linesep) | out.write('export PYMOL_PATH="%s"' % pymol_path + os.linesep) | |||
out.write('"%s" "%s" "$@"' % (python_exe, pymol_file) + os.lines ep) | out.write('"%s" "%s" "$@"' % (python_exe, pymol_file) + os.lines ep) | |||
os.chmod(launch_script, 0o755) | os.chmod(launch_script, 0o755) | |||
#============================================================================ | #============================================================================ | |||
# should be something like (build_base + "/generated"), but that's only | # should be something like (build_base + "/generated"), but that's only | |||
skipping to change at line 268 | skipping to change at line 268 | |||
def_macros = [ | def_macros = [ | |||
("_PYMOL_LIBPNG", None), | ("_PYMOL_LIBPNG", None), | |||
("_PYMOL_INLINE", None), | ("_PYMOL_INLINE", None), | |||
] | ] | |||
libs = [] | libs = [] | |||
pyogl_libs = [] | pyogl_libs = [] | |||
lib_dirs = [] | lib_dirs = [] | |||
ext_comp_args = [ | ext_comp_args = [ | |||
"-Wno-narrowing", | ||||
# legacy stuff | # legacy stuff | |||
'-Wno-write-strings', | ||||
'-Wno-unused-function', | '-Wno-unused-function', | |||
'-Wno-char-subscripts', | '-Wno-char-subscripts', | |||
# optimizations | ||||
"-ffast-math", | ||||
"-funroll-loops", | ||||
"-O3", | ||||
"-fcommon", | ||||
] | ] | |||
ext_link_args = [] | ext_link_args = [] | |||
ext_objects = [] | ext_objects = [] | |||
data_files = [] | data_files = [] | |||
ext_modules = [] | ext_modules = [] | |||
if options.no_cxx11: | if options.no_cxx11: | |||
def_macros += [ | def_macros += [ | |||
('_PYMOL_NO_CXX11', None), | ('_PYMOL_NO_CXX11', None), | |||
] | ] | |||
skipping to change at line 389 | skipping to change at line 394 | |||
] | ] | |||
else: | else: | |||
pyogl_libs += ["GL"] | pyogl_libs += ["GL"] | |||
if not options.no_glut: | if not options.no_glut: | |||
glut = posix_find_lib(['glut', 'freeglut'], lib_dirs) | glut = posix_find_lib(['glut', 'freeglut'], lib_dirs) | |||
pyogl_libs += [glut] | pyogl_libs += [glut] | |||
libs += ["GLEW"] | libs += ["GLEW"] | |||
libs += pyogl_libs | libs += pyogl_libs | |||
ext_comp_args += ["-ffast-math", "-funroll-loops", "-fcommon"] | if sys.platform.startswith("freebsd"): | |||
libs += ["execinfo"] | ||||
# optimization currently causes a clang segfault on OS X 10.9 when | # optimization currently causes a clang segfault on OS X 10.9 when | |||
# compiling layer2/RepCylBond.cpp | # compiling layer2/RepCylBond.cpp | |||
if sys.platform != 'darwin': | if sys.platform == 'darwin': | |||
ext_comp_args += ["-O3"] | ext_comp_args += ["-fno-strict-aliasing"] | |||
def get_pymol_version(): | def get_pymol_version(): | |||
return re.findall(r'_PyMOL_VERSION "(.*)"', open('layer0/Version.h').read()) [0] | return re.findall(r'_PyMOL_VERSION "(.*)"', open('layer0/Version.h').read()) [0] | |||
def get_sources(subdirs, suffixes=('.c', '.cpp')): | def get_sources(subdirs, suffixes=('.c', '.cpp')): | |||
return sorted([f for d in subdirs for s in suffixes for f in glob(d + '/*' + s)]) | return sorted([f for d in subdirs for s in suffixes for f in glob(d + '/*' + s)]) | |||
def get_packages(base, parent='', r=None): | def get_packages(base, parent='', r=None): | |||
from os.path import join, exists | from os.path import join, exists | |||
if r is None: | if r is None: | |||
End of changes. 6 change blocks. | ||||
5 lines changed or deleted | 11 lines changed or added |