From 89f696dfa476e26806bc92acd17e6df27440ae48 Mon Sep 17 00:00:00 2001 From: grbd Date: Thu, 3 Aug 2017 12:33:51 -0700 Subject: Added docs for use of the PyPackageDir function --- doc/generated/functions.gen | 25 +++++++++++++++++++++++++ doc/generated/functions.mod | 4 ++++ doc/generated/tools.gen | 16 ++++++++++++++++ doc/generated/tools.mod | 4 ++++ doc/generated/variables.gen | 29 +++++++++++++++++++++++++++-- doc/generated/variables.mod | 2 ++ doc/scons.mod | 1 + doc/user/environments.xml | 32 ++++++++++++++++++++++++++++++++ 8 files changed, 111 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/generated/functions.gen b/doc/generated/functions.gen index 8181d56c..e72740a2 100644 --- a/doc/generated/functions.gen +++ b/doc/generated/functions.gen @@ -3318,6 +3318,31 @@ is more appropriate. Multiple targets can be passed in to a single call to Pseudo. + + + + + PyPackageDir(modulename) + + + env.PyPackageDir(modulename) + + + +This returns a Directory Node similar to Dir. +The python module / package is looked up and if located +the directory is returned for the location. +modulename +Is a named python package / module to +lookup the directory for it's location. + + +If +modulename +is a list, SCons returns a list of Dir nodes. +Construction variables are expanded in +modulename. + diff --git a/doc/generated/functions.mod b/doc/generated/functions.mod index 61832939..e460aafe 100644 --- a/doc/generated/functions.mod +++ b/doc/generated/functions.mod @@ -69,6 +69,7 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. PrependUnique"> Progress"> Pseudo"> +PyPackageDir"> Replace"> Repository"> Requires"> @@ -152,6 +153,7 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. env.PrependUnique"> env.Progress"> env.Pseudo"> +env.PyPackageDir"> env.Replace"> env.Repository"> env.Requires"> @@ -245,6 +247,7 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. PrependUnique"> Progress"> Pseudo"> +PyPackageDir"> Replace"> Repository"> Requires"> @@ -328,6 +331,7 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. env.PrependUnique"> env.Progress"> env.Pseudo"> +env.PyPackageDir"> env.Replace"> env.Repository"> env.Requires"> diff --git a/doc/generated/tools.gen b/doc/generated/tools.gen index d4b346dd..0de9e036 100644 --- a/doc/generated/tools.gen +++ b/doc/generated/tools.gen @@ -94,6 +94,22 @@ Sets construction variables for the bcc32 compiler. Sets construction variables for generic POSIX C copmilers. Sets: &cv-link-CC;, &cv-link-CCCOM;, &cv-link-CCFLAGS;, &cv-link-CFILESUFFIX;, &cv-link-CFLAGS;, &cv-link-CPPDEFPREFIX;, &cv-link-CPPDEFSUFFIX;, &cv-link-FRAMEWORKPATH;, &cv-link-FRAMEWORKS;, &cv-link-INCPREFIX;, &cv-link-INCSUFFIX;, &cv-link-SHCC;, &cv-link-SHCCCOM;, &cv-link-SHCCFLAGS;, &cv-link-SHCFLAGS;, &cv-link-SHOBJSUFFIX;.Uses: &cv-link-PLATFORM;. + + + clang + + +Set construction variables for the Clang C compiler. + +Sets: &cv-link-CC;, &cv-link-CCVERSION;, &cv-link-SHCCFLAGS;. + + + clangxx + + +Set construction variables for the Clang C++ compiler. + +Sets: &cv-link-CXX;, &cv-link-CXXVERSION;, &cv-link-SHCXXFLAGS;, &cv-link-SHOBJSUFFIX;, &cv-link-STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME;. cvf diff --git a/doc/generated/tools.mod b/doc/generated/tools.mod index ee387ad3..f9bc1d7f 100644 --- a/doc/generated/tools.mod +++ b/doc/generated/tools.mod @@ -18,6 +18,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. as"> bcc32"> cc"> +clang"> +clangxx"> cvf"> cXX"> cyglink"> @@ -124,6 +126,8 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. as"> bcc32"> cc"> +clang"> +clangxx"> cvf"> cXX"> cyglink"> diff --git a/doc/generated/variables.gen b/doc/generated/variables.gen index e31fde1b..0ad4c96d 100644 --- a/doc/generated/variables.gen +++ b/doc/generated/variables.gen @@ -3046,7 +3046,7 @@ The command line used to call the Java archive tool. The string displayed when the Java archive tool is called -If this is not set, then $JARCOM (the command line) is displayed. +If this is not set, then $JARCOM (the command line) is displayed. @@ -3056,7 +3056,7 @@ env = Environment(JARCOMSTR = "JARchiving $SOURCES into $TARGET") The string displayed when the Java archive tool is called -If this is not set, then $JARCOM (the command line) is displayed. +If this is not set, then $JARCOM (the command line) is displayed. @@ -4177,6 +4177,29 @@ MSVC_USE_SCRIPT to None bypasses the Visual Studio autodetection entirely; use this if you are running SCons in a Visual Studio cmd window and importing the shell's environment variables. + + + + MSVC_UWP_APP + + +Build libraries for a Universal Windows Platform (UWP) Application. + + + +If $MSVC_UWP_APP is set, the Visual Studio environment will be set up to point +to the Windows Store compatible libraries and Visual Studio runtimes. In doing so, +any libraries that are built will be able to be used in a UWP App and published +to the Windows Store. +This flag will only have an effect with Visual Studio 2015+. +This variable must be passed as an argument to the Environment() +constructor; setting it later has no effect. + + + +Valid values are '1' or '0' + + @@ -4196,6 +4219,8 @@ constructor; setting it later has no effect. Valid values for Windows are +14.0, +14.0Exp, 12.0, 12.0Exp, 11.0, diff --git a/doc/generated/variables.mod b/doc/generated/variables.mod index 9d834de5..8710f95d 100644 --- a/doc/generated/variables.mod +++ b/doc/generated/variables.mod @@ -304,6 +304,7 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $MSSDK_VERSION"> $MSVC_BATCH"> $MSVC_USE_SCRIPT"> +$MSVC_UWP_APP"> $MSVC_VERSION"> $MSVS"> $MSVS_ARCH"> @@ -927,6 +928,7 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT. $MSSDK_VERSION"> $MSVC_BATCH"> $MSVC_USE_SCRIPT"> +$MSVC_UWP_APP"> $MSVC_VERSION"> $MSVS"> $MSVS_ARCH"> diff --git a/doc/scons.mod b/doc/scons.mod index 8d640541..448a2120 100644 --- a/doc/scons.mod +++ b/doc/scons.mod @@ -243,6 +243,7 @@ PrependENVPath"> PrependUnique"> Progress"> +PyPackageDir"> Replace"> Repository"> Requires"> diff --git a/doc/user/environments.xml b/doc/user/environments.xml index d591dff0..4657c054 100644 --- a/doc/user/environments.xml +++ b/doc/user/environments.xml @@ -1885,6 +1885,38 @@ C:\Python35\Lib\site-packages\someinstalledpackage\SomeTool\__init__.py /usr/lib/python3/dist-packages/someinstalledpackage/SomeTool/__init__.py + + +
+ Using the &PyPackageDir; function to add to the toolpath + + + In some cases you may want to use a tool + located within a installed external pip package. + This is possible by the use of sys.path within the toolpath. + However in that situaion you need to provide a prefix to the toolname + to indicate where it is located within sys.path + + + +# namespaced target using sys.path +env = Environment(tools = ['tools_example.subdir1.subdir2.SomeTool'], toolpath = sys.path) +env.SomeTool(targets, sources) + + + + To avoid the use of a prefix within the name of the tool, + we can use the PyPackageDir(modulename) function to locate the directory of the python package. + PyPackageDir returns a Dir object which represents the path of the directory + for the python package / module specified as a parameter. + + + +# namespaced target using sys.path +env = Environment(tools = ['SomeTool'], toolpath = [PyPackageDir('tools_example.subdir1.subdir2')]) +env.SomeTool(targets, sources) + +
-- cgit v1.2.1