title: Setup script python external c library
body: <p>I have a question about the best way to write a setup.py script that can deal with a project I am working on. Basically, I am writing a python wrapper for an existing c library. Consequently, for my wrapper to run correctly, the third party library must be installed already when I do my linking against it. The third party library comes with a well written makefile, so there are a number of ways to deal with this.</p>
  
  <p>For example, an approach such as this in setup.py might be useful:</p>
  
  <pre><code>import subprocess 
  
  pr = subprocess.check_call(["git", "pull", "location of repo!")
  </code></pre>
  
  <p>and then navigating to the directory and running the makefile through this. </p>
  
  <p>Alternatively, I have though of using a combination of this and <a href="https://stackoverflow.com/questions/15315573/how-can-i-call-git-pull-from-within-python">git python</a></p>
  
  <p>However, I have not seen either of these methods used in third party packages - and am not sure if there is a better way to do this</p>