scons

How to call SCons global function from a helper-script called by a SConscript?

How to call SCons global function from a helper-script called by a SConscript? Question: I have some non-trivial logic necessary to compute the paths to certain source & header file directories and since it applies to multiple SConscripts I put it in a separate .py file, imported from each SConscript that needs it. Now I …

Total answers: 1

Whats the equivalent of Makefile's include for SConstruct?

Whats the equivalent of Makefile's include for SConstruct? Question: I’m trying find the best way to replicate Makefile’s include in SConstruct. I have come up with a solution, but its messy, relies of the user passing in specific command-line parameters and surely can’t be the best option. My file structure is as so: Working_Dir/ |-> …

Total answers: 1

How to add pre and post-process actions to SCons build?

How to add pre and post-process actions to SCons build? Question: I’m trying to add pre and post-process actions when building a project with SCons. The SConstruct and SConscript files are at the top of the project. Pre-process actions: Generating code(by calling different tools): -> without knowing the exact files that will be generated after …

Total answers: 1

building jsoncpp (Linux) – an instruction for us mere mortals?

building jsoncpp (Linux) – an instruction for us mere mortals? Question: I am trying to build jsoncpp on Ubuntu 10.x – however the ‘instructions’ are at times vague. For example, it is not clear exactly which folder the scons.py file needs to reside in before the lib can be built. Can someone outline the steps …

Total answers: 4

What are the SCons alternatives?

What are the SCons alternatives? Question: I have projects in C++, Java and Python. Projects in C++ export SWIG interfaces so they can be used by Java and Python projects. My question is: what building mechanism can I use to manage dependencies and build these projects? I have used SCons and GYP. They are fairly …

Total answers: 5

How can I replace (or strip) an extension from a filename in Python?

How can I replace (or strip) an extension from a filename in Python? Question: Is there a built-in function in Python that would replace (or remove, whatever) the extension of a filename (if it has one)? Example: print replace_extension(‘/home/user/somefile.txt’, ‘.jpg’) In my example: /home/user/somefile.txt would become /home/user/somefile.jpg I don’t know if it matters, but I …

Total answers: 8