I have been using scons for years and I have seen very few instances that using
'/' for path has caused issues.
Also you can get the root file for a path anytime using env.Dir("#"). This
returns a scons node if you need the string a string you can
Call str(env.Dir('#')).
In general I am happy to use linux style '/' paths for all paths unless an
issue is discovered and in those cases use os.path.join.
Every time I have seen an issue using '/' in scons was in a builder for a 3rd
party tool. I just fixed the builder.
George
-----Original Message-----
From: iotivity-dev-bounces at lists.iotivity.org
[mailto:[email protected]] On Behalf Of Mats Wichmann
Sent: Wednesday, May 3, 2017 5:31 PM
To: Dave Thaler <dthaler at microsoft.com>; IoTivity Developer List
<iotivity-dev at lists.iotivity.org>
Subject: Re: [dev] sconscript consistency (#1 or potentially several)
On 05/03/2017 06:27 PM, Dave Thaler wrote:
> The platform support wiki page<https://wiki.iotivity.org/platform_support>
> has this:
>
>
> Use of os.path.join in SConscript files The path separator differs
> across platforms ('/' vs '\'). There has been some confusion about when to
> use os.path.join in SConscript files. In short:
> 1. Use os.path.join when constructing paths passed as arguments to a
> compiler, such as when constructing CPPPATH or LIBS
> 2. Don't use os.path.join when constructing paths interpreted by Python
> itself, such as via an env.SConscript() call
>
>
>
> Point 2 is what you're asking about, so no objection that's already the
> guidance.
>
> Separately point 1 might need elaboration since the "#..." syntax of a file
> relative to the SConstruct file seems to be processed by scons, so the part
> about "when constructing CPPPATH" may not be correct, maybe scons
> pre-processes it before passing it to the compiler, in which case
> os.path.join isn't needed there either.
>
> If someone can explain how "#..." works for CPPPATH, I'm happy to update
> point 1 above.
>
>
>
> But for your question about point 2, please go ahead.
>
this one was only for the SConscript calls, not for other paths.
_______________________________________________
iotivity-dev mailing list
iotivity-dev at lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev