[Scons-users] Question over BuilderBase / repo of Builders and Finder Tools
RW
garlicbready at googlemail.com
Fri Jun 9 10:50:59 EDT 2017
Hi Bill,
I had read most of the user manual before but it looks like the closest
match is the use of a Pseudo-Builder / AddMethod which is one of the bits
I'd skipped over.
I'm pretty sure I can use it do do what I'm trying to do, so thanks for the
info
I'll do a fork of the repo you've mentioned then see if I can add some code
to it.
I'm planning on using class's instead of functions so I'll need to wait and
see if that fits with the design of how the existing builders / tools are
used when I get around to doing a pull request
As a rough example
```
# First add via a tool module
# Use AddMethod in the tool module to wrapper the creation of a class
env = Environment(tools=['default','dotnetcore'])
# When calling the method added via AddMethod create and return a class
instance
# Parameters are passed to the class constructor
# Class handles the setup of additional builders / sources / targets
runner = env.DotnetcoreRunner('example.csproj')
# Modify properties of the underlying class instance before the build takes
place
runner.buildtype = "Debug"
```
Many Thanks
Richard
On 9 June 2017 at 13:04, Bill Deegan <bill at baddogconsulting.com> wrote:
> Richard,
>
> You might want to read through the users guide and manpage and also this
> wiki page.
> https://bitbucket.org/scons/scons/wiki/ToolsForFools
>
> You should use Builder() to create builders. Most likely you'll not need
> to read the source code of SCons to complete your tasks.
> The Docs and wiki usually have sufficient content.
>
> Also take a look at the list of user maintained builders:
> https://bitbucket.org/scons/scons/wiki/ToolsIndex
>
> And scons-contrib repo which is where we're encouraging people to submit
> builders not ready for or not mainstream enough for inclusion in the core.
> Please consider forking this repo and then submitting your changes for
> inclusion there.
> https://bitbucket.org/scons/scons-contrib/overview
>
> -Bill
> SCons Project Co-Manager.
>
> On Fri, Jun 9, 2017 at 6:47 AM, RW via Scons-users <scons-users at scons.org>
> wrote:
>
>> Hi,
>> I've noticed that there's a class within Scons called BuilderBase
>> I just wanted to ask is it safe to inherit from this class for creating
>> Builders external to the main scons repo?
>> I've noticed there isn't any documentation on it, but I'd like the
>> ability to create a builder that's a class
>> I can probably still do it using the traditional method of pointing to
>> functions, but I think using BuilderBase might make life easier
>>
>> Another question, are there any plans to have a seperate repository for
>> storing contributed Builders such as those on the wiki?
>> I'm looking into creating my own repo on github with Builders for dotnet
>> core, and mkdocs as a couple of examples, that can be installed via pip
>> CMake has a large number of modules for finding paths to different
>> libraries such as FindQt for example.
>> I'm thinking under scons this would be considered a tool, but if there's
>> a general place to put any contributed builders / finding tools etc
>>
>> Many Thanks
>> Richard
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170609/a01ea16c/attachment.html>
More information about the Scons-users
mailing list