title: SCons: How to import a Python module in an SConscript which has been invoked with VariantDir?
body: <p>My build is structured like:</p>
  
  <pre><code>SConstruct
  subdir/SConscript
  subdir/module/__init__.py
  </code></pre>
  
  <p><code>SConstruct</code> invokes <code>subdir/SConscript</code> as a subsidiary:</p>
  
  <pre><code># SConstruct
  SConscript('subdir/SConscript')
  </code></pre>
  
  <p><code>subdir/SConscript</code> imports <code>module</code>:</p>
  
  <pre><code># subdir/SConscript
  from module import foo
  do SConsy stuff with foo()...
  </code></pre>
  
  <p>This works fine until I use <code>variant_dir</code> with <code>subdir/SConscript</code>:</p>
  
  <pre><code># SConstruct
  SConscript('subdir/SConscript', variant_dir='subdir/build', duplicate=0)
  </code></pre>
  
  <p>The problem is that the <code>import</code> fails because <code>module</code> is no longer in the path, which has been altered by <code>variant_dir</code>.</p>
  
  <p>Is there a standard way to solve this problem in either SCons or Python? I know about the special <code>site_scons</code> directory, but it appears that this directory must exist at the top level with the root <code>SConstruct</code>, and I'd like to keep <code>subdir</code>-specific files under <code>subdir</code>.</p>