scons icon indicating copy to clipboard operation
scons copied to clipboard

class Tool: self.options is not a callable entity

Open bdbaddog opened this issue 7 years ago • 3 comments

This issue was originally created at: 2009-03-02 23:44:49. This issue was reported by: marcelhuber.

marcelhuber said at 2009-03-02 23:44:50

When global options (attribute) are specified in a Tool based module, it will not be callable anymore because the following line will throw an exception:

SCons/Tool/__init__.py:178::
   self.options(opts)

Instead it should be a simple assignment afaik like:

   self.options=opts

At least I was able to continue using my module'd config afterwards.

gregnoel said at 2009-03-05 15:39:00

Bug party triage. If present, 'options' is intended as a callback when the tool is called explicitly. Unfortunately, this usage is not documented. Steven to document such reserved usage and then WONTFIX this issue. Marcel, you should use a different name in your module.

stevenknight said at 2009-11-10 18:00:20

stevenknight => issues@scons

gregnoel said at 2010-02-03 13:05:41

Bug party triage. Steven to document restriction and mark issue WONTFIX.

bdbaddog avatar Jan 02 '18 13:01 bdbaddog

Where would one document this? Is there a document targeted at tool writers? Certainly doesn't seem like a manpage candidate.

mwichmann avatar Feb 17 '20 14:02 mwichmann

Hmm. there's https://github.com/SCons/scons/wiki/ToolsForFools

and/or this: https://scons.org/doc/production/HTML/scons-user.html#idm3860

bdbaddog avatar Feb 17 '20 16:02 bdbaddog

Maybe Tools chapter in userguide, to follow the Builder section? Not sure I could volunteer to write that though. So the wiki page I guess is the best first step.

mwichmann avatar Feb 17 '20 16:02 mwichmann