title: Post-install script with Python setuptools
body: <p>Is it possible to specify a post-install Python script file as part of the setuptools setup.py file so that a user can run the command:</p>
  
  <pre><code>python setup.py install
  </code></pre>
  
  <p>on a local project file archive, or</p>
  
  <pre><code>pip install &lt;name&gt;
  </code></pre>
  
  <p>for a PyPI project and the script will be run at the completion of the standard setuptools install?  I am looking to perform post-install tasks that can be coded in a single Python script file (e.g. deliver a custom post-install message to the user, pull additional data files from a different remote source repository).</p>
  
  <p>I came across <a href="https://stackoverflow.com/questions/250038/how-can-i-add-post-install-scripts-to-easy-install-setuptools-distutils">this SO answer from several years ago</a> that addresses the topic and it sounds as though the consensus at that time was that you need to create an install subcommand.  If that is still the case, would it be possible for someone to provide an example of how to do this so that it is not necessary for the user to enter a second command to run the script?</p>