mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-19 09:01:15 +02:00
Update local LV2 libraries to latest versions
lilv-0.24.6 lv2-1.16.0 serd-0.30.2 sord-0.16.4 sratom-0.6.4 suil-0.10.6
This commit is contained in:
@@ -1,53 +1,64 @@
|
||||
#! /usr/bin/env python
|
||||
#!/usr/bin/env python
|
||||
# encoding: utf-8
|
||||
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
|
||||
# Thomas Nagy, 2010-2018 (ita)
|
||||
|
||||
from __future__ import with_statement
|
||||
|
||||
import os
|
||||
all_modifs={}
|
||||
|
||||
all_modifs = {}
|
||||
|
||||
def fixdir(dir):
|
||||
global all_modifs
|
||||
"""Call all substitution functions on Waf folders"""
|
||||
for k in all_modifs:
|
||||
for v in all_modifs[k]:
|
||||
modif(os.path.join(dir,'waflib'),k,v)
|
||||
def modif(dir,name,fun):
|
||||
if name=='*':
|
||||
lst=[]
|
||||
for y in'. Tools extras'.split():
|
||||
for x in os.listdir(os.path.join(dir,y)):
|
||||
modif(os.path.join(dir, 'waflib'), k, v)
|
||||
|
||||
def modif(dir, name, fun):
|
||||
"""Call a substitution function"""
|
||||
if name == '*':
|
||||
lst = []
|
||||
for y in '. Tools extras'.split():
|
||||
for x in os.listdir(os.path.join(dir, y)):
|
||||
if x.endswith('.py'):
|
||||
lst.append(y+os.sep+x)
|
||||
lst.append(y + os.sep + x)
|
||||
for x in lst:
|
||||
modif(dir,x,fun)
|
||||
modif(dir, x, fun)
|
||||
return
|
||||
filename=os.path.join(dir,name)
|
||||
f=open(filename,'r')
|
||||
try:
|
||||
txt=f.read()
|
||||
finally:
|
||||
f.close()
|
||||
txt=fun(txt)
|
||||
f=open(filename,'w')
|
||||
try:
|
||||
|
||||
filename = os.path.join(dir, name)
|
||||
with open(filename, 'r') as f:
|
||||
txt = f.read()
|
||||
|
||||
txt = fun(txt)
|
||||
|
||||
with open(filename, 'w') as f:
|
||||
f.write(txt)
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
def subst(*k):
|
||||
"""register a substitution function"""
|
||||
def do_subst(fun):
|
||||
global all_modifs
|
||||
for x in k:
|
||||
try:
|
||||
all_modifs[x].append(fun)
|
||||
except KeyError:
|
||||
all_modifs[x]=[fun]
|
||||
all_modifs[x] = [fun]
|
||||
return fun
|
||||
return do_subst
|
||||
|
||||
@subst('*')
|
||||
def r1(code):
|
||||
code=code.replace(',e:',',e:')
|
||||
code=code.replace("",'')
|
||||
code=code.replace('','')
|
||||
return code
|
||||
"utf-8 fixes for python < 2.6"
|
||||
code = code.replace('as e:', ',e:')
|
||||
code = code.replace(".decode(sys.stdout.encoding or'latin-1',errors='replace')", '')
|
||||
return code.replace('.encode()', '')
|
||||
|
||||
@subst('Runner.py')
|
||||
def r4(code):
|
||||
code=code.replace('next(self.biter)','self.biter.next()')
|
||||
return code
|
||||
"generator syntax"
|
||||
return code.replace('next(self.biter)', 'self.biter.next()')
|
||||
|
||||
@subst('Context.py')
|
||||
def r5(code):
|
||||
return code.replace("('Execution failure: %s'%str(e),ex=e)", "('Execution failure: %s'%str(e),ex=e),None,sys.exc_info()[2]")
|
||||
|
||||
|
Reference in New Issue
Block a user