[Scons-users] symlink builder
Bill Deegan
bill at baddogconsulting.com
Thu Mar 2 00:24:25 EST 2017
Are you using duplicate=0?
I guess why are the files real files in your variant dir?
>From manpage:
--duplicate=*ORDER*
There are three ways to duplicate files in a build tree: hard links, soft
(symbolic) links and copies. The default behaviour of SCons is to prefer
hard links to soft links to copies. You can specify different behaviours
with this option. *ORDER* must be one of *hard-soft-copy* (the default),
*soft-hard-copy*, *hard-copy*, *soft-copy* or *copy*. SCons will attempt to
duplicate files using the mechanisms in the specified order.
On Wed, Mar 1, 2017 at 6:17 PM, Mark Diekhans <markd at kermodei.com> wrote:
>
> I have a symlink builder I got off the net:
>
> symlink.py from http://stackoverflow.com/questions/3532307/how-to-
> create-a-symbolic-link-with-scons
>
>
> Our goal is to have a directory in the variant directory be
> symlinks to avoid developers edit the wrong scripting language
> source.
>
> This works find on the when the symlink is not present. On
> subsequence builds, it generates the below error, indicating
> that it has mistakenly identified the symlink as a directory.
> This appears to be caused by FS.py using stat rather than lstat
> or that the logic in diskcheck_match functions is incorrect.
>
> Is this a problem with scons or is there another way to build
> symbolic links.
>
> scons: Reading SConscript files ...
> TypeError: Directory /cluster/home/markd/compbio/compartiveGenomics/projs/
> springClean/src/cgtBuild/build/sonLib/lib/py/cgt/sonLib found where file
> expected.:
> File "/cluster/home/markd/compbio/compartiveGenomics/projs/
> springClean/src/cgtBuild/sconstruct", line 40:
> variant_dir="build/sonLib", duplicate=False)
> File "/cluster/home/markd/opt/centos6.0/x86_64/lib/python2.
> 7/site-packages/scons-2.5.1/SCons/Script/SConscript.py", line 604:
> return method(*args, **kw)
> File "/cluster/home/markd/opt/centos6.0/x86_64/lib/python2.
> 7/site-packages/scons-2.5.1/SCons/Script/SConscript.py", line 541:
> return _SConscript(self.fs, *files, **subst_kw)
> File "/cluster/home/markd/opt/centos6.0/x86_64/lib/python2.
> 7/site-packages/scons-2.5.1/SCons/Script/SConscript.py", line 250:
> exec _file_ in call_stack[-1].globals
> File "/cluster/home/markd/compbio/compartiveGenomics/projs/
> springClean/src/cgtBuild/mods/sonLib/sconscript", line 66:
> env.SymLink("./lib/py/cgt/sonLib", "#/mods/sonLib/py/cgt/sonLib")
> File "/cluster/home/markd/opt/centos6.0/x86_64/lib/python2.
> 7/site-packages/scons-2.5.1/SCons/Environment.py", line 260:
> return MethodWrapper.__call__(self, target, source, *args, **kw)
> File "/cluster/home/markd/opt/centos6.0/x86_64/lib/python2.
> 7/site-packages/scons-2.5.1/SCons/Environment.py", line 224:
> return self.method(*nargs, **kwargs)
> File "/cluster/home/markd/opt/centos6.0/x86_64/lib/python2.
> 7/site-packages/scons-2.5.1/SCons/Builder.py", line 626:
> return self._execute(env, target, source, OverrideWarner(kw), ekw)
> File "/cluster/home/markd/opt/centos6.0/x86_64/lib/python2.
> 7/site-packages/scons-2.5.1/SCons/Builder.py", line 547:
> tlist, slist = self._create_nodes(env, target, source)
> File "/cluster/home/markd/opt/centos6.0/x86_64/lib/python2.
> 7/site-packages/scons-2.5.1/SCons/Builder.py", line 494:
> tlist = env.arg2nodes(target, target_factory, target=target,
> source=source)
> File "/cluster/home/markd/opt/centos6.0/x86_64/lib/python2.
> 7/site-packages/scons-2.5.1/SCons/Environment.py", line 483:
> v = node_factory(self.subst(v, **kw))
> File "/cluster/home/markd/opt/centos6.0/x86_64/lib/python2.
> 7/site-packages/scons-2.5.1/SCons/Node/FS.py", line 1404:
> return self._lookup(name, directory, File, create)
> File "/cluster/home/markd/opt/centos6.0/x86_64/lib/python2.
> 7/site-packages/scons-2.5.1/SCons/Node/FS.py", line 1383:
> return root._lookup_abs(p, fsclass, create)
> File "/cluster/home/markd/opt/centos6.0/x86_64/lib/python2.
> 7/site-packages/scons-2.5.1/SCons/Node/FS.py", line 2395:
> result.diskcheck_match()
> File "/cluster/home/markd/opt/centos6.0/x86_64/lib/python2.
> 7/site-packages/scons-2.5.1/SCons/Node/FS.py", line 2593:
> "Directory %s found where file expected.")
> File "/cluster/home/markd/opt/centos6.0/x86_64/lib/python2.
> 7/site-packages/scons-2.5.1/SCons/Node/FS.py", line 398:
> return self.func(*args, **kw)
> File "/cluster/home/markd/opt/centos6.0/x86_64/lib/python2.
> 7/site-packages/scons-2.5.1/SCons/Node/FS.py", line 419:
> raise TypeError(errorfmt % node.get_abspath())
>
> _______________________________________________
> 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/20170301/59e54eac/attachment.html>
More information about the Scons-users
mailing list