13
0
livetrax/libs/auscan/wscript
Mads Kiilerich 7737c17d52 wscript: drop unused imports, scripted
Done with ad hoc scripting hacks processing unused imports found by pyflakes:

for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Logs.* but unused' | cut -d: -f1 | while read f; do sed -i 's/^import waflib.Logs as Logs,/import/g' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i 's/import waflib.Options as Options, /import /g' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i 's/^from waflib import Options,/from waflib import/g' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep ' imported but unused$' | sed "s/^\([^:]*\):[0-9]*:[0-9]* '\(.*\)'.*/\1 \2/g" | while read f lib; do sed -i "/^import $lib$/d" $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Options.* but unused' | cut -d: -f1 | while read f; do sed -i '/from waflib import Options$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.TaskGen.* but unused' | cut -d: -f1 | while read f; do sed -i '/from waflib import TaskGen$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Task.Task.* but unused' | cut -d: -f1 | while read f; do sed -i '/^from waflib.Task import Task$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Tools.winres.* but unused' | cut -d: -f1 | while read f; do sed -i '/^from waflib.Tools import winres$/d' $f; done
for f in $( find * -name wscript ); do echo; pyflakes $f; done | grep 'waflib.Utils.* but unused' | cut -d: -f1 | while read f; do sed -i '/^import waflib.Utils as Utils$/d' $f; done
2023-09-17 07:34:55 -06:00

35 lines
1.1 KiB
Python

#!/usr/bin/env python
from waflib.extras import autowaf as autowaf
import os
# Mandatory variables
top = '.'
out = 'build'
# needed for code used from libardour
I18N_PACKAGE = 'ardour'
def options(opt):
autowaf.set_options(opt)
def configure(conf):
pass
def build(bld):
if bld.is_defined('AUDIOUNIT_SUPPORT'):
obj = bld (features = 'cxx c cxxprogram')
obj.source = 'au-scanner.cc'
obj.target = 'ardour-au-scanner'
obj.includes = [ '../pbd/', '../ardour/', '..' ]
obj.defines = [
'AU_SCANNER_APP',
'VERSIONSTRING="' + str(bld.env['VERSION']) + '"',
'PACKAGE="' + I18N_PACKAGE + str(bld.env['MAJOR']) + '"',
'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"',
'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
]
obj.use = [ 'libpbd', 'libappleutility', 'libtemporal', 'libevoral' ]
obj.uselib = 'GIOMM DL UUID ARCHIVE CURL XML COREAUDIO AUDIOUNITS OSX'
obj.install_path = os.path.join(bld.env['LIBDIR'])
obj.cxxflags = ['-Wno-deprecated-declarations']