def install_openblas():
 chdir(SRC_DIR)
 apt_command('build-dep libopenblas-dev')
 if glob.glob('*openblas*.deb'):
  run_command('dpkg -i *openblas*.deb')
 else:
  apt_command('source libopenblas-dev')
  chdir('openblas-*')
  patch = open('fix_makefile_system.patch', 'w')
  patch.write(OPENBLAS_0_1ALPHA_2_PATCH)
  patch.close()
  run_command(('patch -p1 < %s' % patch.name))
  rule_file = open('Makefile.rule', 'a')
  lines = ['DYNAMIC_ARCH=1', 'NUM_THREADS=64', 'NO_LAPACK=1', 'NO_AFFINITY=1']
  rule_file.write('\n'.join(lines))
  rule_file.close()
  run_command('fakeroot debian/rules custom')
  run_command('dpkg -i ../*openblas*.deb')
 run_command('echo libopenblas-base hold | dpkg --set-selections')
 run_command('echo libopenblas-dev hold | dpkg --set-selections')

def install_openblas ( ) : chdir ( SRC_DIR ) apt_command ( 'build-dep libopenblas-dev' ) if glob . glob ( '*openblas*.deb' ) : run_command ( 'dpkg -i *openblas*.deb' ) else : apt_command ( 'source libopenblas-dev' ) chdir ( 'openblas-*' ) patch = open ( 'fix_makefile_system.patch' , 'w' ) patch . write ( OPENBLAS_0_1ALPHA_2_PATCH ) patch . close ( ) run_command ( ( 'patch -p1 < %s' % patch . name ) ) rule_file = open ( 'Makefile.rule' , 'a' ) lines = [ 'DYNAMIC_ARCH=1' , 'NUM_THREADS=64' , 'NO_LAPACK=1' , 'NO_AFFINITY=1' ] rule_file . write ( '\n' . join ( lines ) ) rule_file . close ( ) run_command ( 'fakeroot debian/rules custom' ) run_command ( 'dpkg -i ../*openblas*.deb' ) run_command ( 'echo libopenblas-base hold | dpkg --set-selections' ) run_command ( 'echo libopenblas-dev hold | dpkg --set-selections' )
docstring for install_openblas .