root/trunk/libffado/admin/pyuic5.py

Revision 2802, 1.5 kB (checked in by jwoithe, 3 years ago)

Cosmetic: "Firewire" becomes "FireWire?".

Officially both the "F" and "W" were capitalised in the FireWire? name, so
reflect this throughout FFADO's source tree. This mostly affects comments.

This patch originated from pander on the ffado-devel mailing list. To
maintain consistency, the committed version has been expanded to include
files not originally included in the original patch.

Line 
1 #!/usr/bin/python
2 #
3 # Copyright (C) 2007-2008 Arnold Krille
4 # Copyright (C) 2017 Jonathan Woithe
5 #
6 # This file is part of FFADO
7 # FFADO = Free FireWire (pro-)audio drivers for linux
8 #
9 # FFADO is based upon FreeBoB.
10 #
11 # This program is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation, either version 2 of the License, or
14 # (at your option) version 3 of the License.
15 #
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
23 #
24
25 import imp
26
27 def pyuic5_action( target, source, env ):
28         env.Execute( "pyuic5 " + str( source[0] ) + " > " + str( target[0] ) )
29         return 0
30
31 def pyuic5_string( target, source, env ):
32         return "building '%s' from '%s'" % ( str(target[0]), str( source[0] ) )
33
34 def PyQt5Check( context ):
35         context.Message( "Checking for pyuic5 (by checking for the python module pyqtconfig) " )
36         ret = True
37         try:
38                 imp.find_module( "pyqtconfig" )
39         except ImportError:
40                 ret = False
41         context.Result( ret )
42         return ret
43
44 def generate( env, **kw ):
45         env['BUILDERS']['PyUIC5'] = env.Builder( action=pyuic5_action, src_suffix=".ui", single_source=True )
46         env['PYUIC5_TESTS'] = { "PyQt5Check" : PyQt5Check }
47
48
49 def exists( env ):
50         return 1
51
Note: See TracBrowser for help on using the browser.