title: In Python sphinx, how to link to a file in _static directory
body: <p>I have some code and data samples I copy to <code>_static</code> directory and I would like to link to those files in documentation, something like:</p>
  
  <pre><code>.. _pca-run.py: _static/example.data
  </code></pre>
  
  <p>But the problem is that sphinx does not create a proper relative link to this file, but just copies the values as it is. So for nested files where <code>_static</code> is not in the same directory links do not work.</p>