"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "monkeypatch_distutils.py" between
pymol-v1.8.6.0.tar.bz2 and pymol-v2.1.0.tar.bz2

About: PyMOL is a Python-enhanced molecular graphics tool. It excels at 3D visualization of proteins, small molecules, density, surfaces, and trajectories. It also includes molecular editing, ray tracing, and movies. Open Source version.

monkeypatch_distutils.py  (pymol-v1.8.6.0.tar.bz2):monkeypatch_distutils.py  (pymol-v2.1.0.tar.bz2)
skipping to change at line 30 skipping to change at line 30
except ImportError: except ImportError:
_osx_support = None _osx_support = None
distutils.unixccompiler.UnixCCompiler.executables.update({ distutils.unixccompiler.UnixCCompiler.executables.update({
'compiler_cxx' : ["c++"], 'compiler_cxx' : ["c++"],
'compiler_so_cxx' : ["c++"], 'compiler_so_cxx' : ["c++"],
'linker_so_cxx' : ["c++", "-shared"], 'linker_so_cxx' : ["c++", "-shared"],
'linker_exe_cxx' : ["c++"], 'linker_exe_cxx' : ["c++"],
}) })
def set_parallel_jobs(N):
Set the number of parallel build jobs.
N=1 : single threaded
N=0 : use number of CPUs
global pmap
if N == 1:
pmap = map
from multiprocessing import pool
pmap = pool.ThreadPool(N or None).map
def monkeypatch(parent, name): def monkeypatch(parent, name):
''' '''
Decorator to replace a function or class method. Makes the Decorator to replace a function or class method. Makes the
unpatched function available as <patchedfunction>._super unpatched function available as <patchedfunction>._super
''' '''
def wrapper(func): def wrapper(func):
orig = getattr(parent, name) orig = getattr(parent, name)
func._super = orig func._super = orig
func.__name__ = name func.__name__ = name
setattr(parent, name, func) setattr(parent, name, func)
 End of changes. 1 change blocks. 
0 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)