OLD | NEW |
1 """engine.SCons.Variables.PackageVariable | 1 """engine.SCons.Variables.PackageVariable |
2 | 2 |
3 This file defines the option type for SCons implementing 'package | 3 This file defines the option type for SCons implementing 'package |
4 activation'. | 4 activation'. |
5 | 5 |
6 To be used whenever a 'package' may be enabled/disabled and the | 6 To be used whenever a 'package' may be enabled/disabled and the |
7 package path may be specified. | 7 package path may be specified. |
8 | 8 |
9 Usage example: | 9 Usage example: |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 'yes')) | 21 'yes')) |
22 ... | 22 ... |
23 if env['x11'] == True: | 23 if env['x11'] == True: |
24 dir = ... search X11 in some standard places ... | 24 dir = ... search X11 in some standard places ... |
25 env['x11'] = dir | 25 env['x11'] = dir |
26 if env['x11']: | 26 if env['x11']: |
27 ... build with x11 ... | 27 ... build with x11 ... |
28 """ | 28 """ |
29 | 29 |
30 # | 30 # |
31 # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundat
ion | 31 # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons F
oundation |
32 # | 32 # |
33 # Permission is hereby granted, free of charge, to any person obtaining | 33 # Permission is hereby granted, free of charge, to any person obtaining |
34 # a copy of this software and associated documentation files (the | 34 # a copy of this software and associated documentation files (the |
35 # "Software"), to deal in the Software without restriction, including | 35 # "Software"), to deal in the Software without restriction, including |
36 # without limitation the rights to use, copy, modify, merge, publish, | 36 # without limitation the rights to use, copy, modify, merge, publish, |
37 # distribute, sublicense, and/or sell copies of the Software, and to | 37 # distribute, sublicense, and/or sell copies of the Software, and to |
38 # permit persons to whom the Software is furnished to do so, subject to | 38 # permit persons to whom the Software is furnished to do so, subject to |
39 # the following conditions: | 39 # the following conditions: |
40 # | 40 # |
41 # The above copyright notice and this permission notice shall be included | 41 # The above copyright notice and this permission notice shall be included |
42 # in all copies or substantial portions of the Software. | 42 # in all copies or substantial portions of the Software. |
43 # | 43 # |
44 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY | 44 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY |
45 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | 45 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE |
46 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | 46 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
47 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | 47 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE |
48 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | 48 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
49 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | 49 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
50 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 50 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
51 # | 51 # |
52 | 52 |
53 __revision__ = "src/engine/SCons/Variables/PackageVariable.py 3842 2008/12/20 22
:59:52 scons" | 53 __revision__ = "src/engine/SCons/Variables/PackageVariable.py 3897 2009/01/13 06
:45:54 scons" |
54 | 54 |
55 __all__ = ['PackageVariable',] | 55 __all__ = ['PackageVariable',] |
56 | 56 |
57 import string | 57 import string |
58 | 58 |
59 import SCons.Errors | 59 import SCons.Errors |
60 | 60 |
61 __enable_strings = ('1', 'yes', 'true', 'on', 'enable', 'search') | 61 __enable_strings = ('1', 'yes', 'true', 'on', 'enable', 'search') |
62 __disable_strings = ('0', 'no', 'false', 'off', 'disable') | 62 __disable_strings = ('0', 'no', 'false', 'off', 'disable') |
63 | 63 |
(...skipping 30 matching lines...) Expand all Loading... |
94 | 94 |
95 A 'package list' option may either be 'all', 'none' or a list of | 95 A 'package list' option may either be 'all', 'none' or a list of |
96 package names (seperated by space). | 96 package names (seperated by space). |
97 """ | 97 """ |
98 help = string.join( | 98 help = string.join( |
99 (help, '( yes | no | /path/to/%s )' % key), | 99 (help, '( yes | no | /path/to/%s )' % key), |
100 '\n ') | 100 '\n ') |
101 return (key, help, default, | 101 return (key, help, default, |
102 lambda k, v, e, f=searchfunc: _validator(k,v,e,f), | 102 lambda k, v, e, f=searchfunc: _validator(k,v,e,f), |
103 _converter) | 103 _converter) |
OLD | NEW |