scons

Run epydoc and/or pylint builders from scons file

三世轮回 提交于 2019-12-25 18:14:46
问题 How would I create builders that runs epydoc or/and pylint from a scons built? 回答1: You can use the Command() builder instead of creating your own builder. For instance, you could execute epydoc as follows: # SCons will substitute $SOURCE and $TARGET accordingly # add any extra cmd line args you need to the cmd string cmd = 'epydoc $SOURCE $TARGET' env.Command(target = yourTarget, source = yourSourceFile_s, action = cmd) 回答2: Here is what I ended up using, based on Brady's answer. ## Create

SCons : Need an explanation why Install not being call with scons -u

隐身守侯 提交于 2019-12-25 08:09:47
问题 There is something that I don`t understand. See following SConscript : Import('common_env') import os #Grab a copy of the top environment (the one sent by the SConstruct file) common_env = common_env.Clone() #Because this component is compiled in both win32 and win64. if (common_env['ENV']['CONFIG'] == "win32") or (common_env['ENV']['CONFIG'] == "win64"): #Grabs the library name, the name should look like libpath_of_current_component-(debug/opt) libName = common_env.libName() common_env.USE

SCons can't locate any tools

半腔热情 提交于 2019-12-25 07:49:54
问题 I was previously able to build this project with SCons, using the toolset from VS2013 CE. Between then and now, all I have done is install then uninstall TDM-GCC, msys and MinGW. Following that, whenever I try to run SCons, I receive this error: D:\Projects>cd xsngine/src D:\Projects\xsngine\src>scons -Q The system cannot find the path specified. IOError: The system cannot find the path specified. : File "D:\Projects\xsngine\src\SConstruct", line 68: env = Environment( TARGET_ARCH = arch )

linker could not found object files from different directory with scons

*爱你&永不变心* 提交于 2019-12-25 03:12:16
问题 Currently, I make a project with scons. I compiled source codes and it is time to link them. However, I got an error that ld cannot find object files. The SConscript is located in src/kernel32, and import os, sys # Compile CPP env_gpp_options = { 'CXX' : 'x86_64-pc-linux-g++', 'CXXFLAGS' : '-std=c++11 -g -m32 -ffreestanding -fno-exceptions -fno-rtti', 'LINK' : 'x86_64-pc-linux-ld', 'LINKFLAGS' : '-melf_i386 -T scripts/elf_i386.x -nostdlib -e main -Ttext 0x10200', } env_gpp = Environment(**env

how to set environment variable in python script

守給你的承諾、 提交于 2019-12-25 01:49:52
问题 i am using SCONS Construction tool. i am unable to use the environment variable which is initialized in python script. In My project USER can change some variables to work with the compiler. For that we have 2 files. Config.py Sconstruct Config.py is having all the variables which are like Include directories, CFLAGS , CPPDEFINES etc. So, Here we can set some variables. Those variables i need to use in Sconstruct file. In config.py i set a variable like below SCONS_INC = "Include files" os

SConscript in different directory to source files

巧了我就是萌 提交于 2019-12-24 14:01:31
问题 I'm building code with multiple environments, outputting to multiple target directories. The natural way to manage this seems to be with variant directories. So I might want to build the same set of files multiple times with different options and different VariantDirs. So I want to be able to have multiple SConscript files in different locations, all referring back to the same source directory. One option I've tried is to do this: SConstruct src/test.cpp src/magic/SConscript This is my

Scons command/explicit dependency

左心房为你撑大大i 提交于 2019-12-24 11:34:50
问题 I have a code snippet similar to this: # Compile protobuf headers env.Protoc(...) # Move headers to 'include' (compiled via protobuf) env.Command([include headers...], [headers...], move_func) # Compile program (depends on 'include' files) out2 = SConscript('src/SConscript') Depends(out2, [include headers...]) Basically, I have Protoc() compiling protobuf files, then the headers are moved to the 'include' directory by env.Command() and finally the program is compiled through a SConscript file

How do I add --whole-archive linker option in scons?

谁都会走 提交于 2019-12-24 03:30:28
问题 I have a library that only interacts in static scope with an application. This requires me to link the library with the --whole-archive option to avoid the linker from "optimizing" out the library (this is done because the linker never actually sees my library being used). The issue is that I haven't found a way to add this linker option for a specific library in scons. env.Append(LIBS=['mylib']) #I don't have the linker option env.Append(LINKFLAGS=['-Wl,--whole-archive','-lmylib']) #I don't

scons: How to deal with dynamic targets?

廉价感情. 提交于 2019-12-24 02:55:17
问题 I'm trying to automate my work of converting PDF to png file with scons . The tool used for my conversion is convert from ImageMagick . Here's the raw command line: convert input.pdf temp/temp.png convert temp/*.png -append output.png The first command will generate one PNG file for each page in PDF file, so the target of the first command is a dynamic file list. Here's the SConstruct file I'm working on: convert = Builder(action=[ Delete("${TARGET.dir}"), Mkdir("${TARGET.dir}"), "convert

Scons: create late targets

痞子三分冷 提交于 2019-12-24 01:49:15
问题 We have two tools: Tool1 and Tool2. Tool1 create some TargetFile, based on the SourceFile. Tool2 use the output of Tool1 (TargetFile) as a source. Structure is similar to this: env.Tool1(TargetFile, SourceFile) env.Tool2(NewTargetFile, TargetFile) The problem is that emitter of Tool2 use TargetFile to create new targets: def Tool2_emitter(target, source, env): target.append( CreateNewTargetFunc(source) ) return target, source But when Scons is creating a dependency, then he can't find