title: How to require and install a package using python 3.x distutils?
body: <p>I have a program that uses <code>dateutil</code> from the package index. I would like to have setup.py check for for its presence and try to get it using <code>easy_install</code> if it is not there. </p>
  
  <p><a href="http://docs.python.org/py3k/distutils/setupscript.html#relationships-between-distributions-and-packages" rel="noreferrer">The documentation for <code>distutils</code></a> seems to indicate that this can be done using the <code>requires</code> keyword in <code>setup()</code>, but when I try, it installs on a system without <code>dateutil</code> without giving a warning or installing the required package. </p>
  
  <p>The only thing I could find on google was <a href="http://blog.doughellmann.com/2007/11/requiring-packages-with-distutils.html" rel="noreferrer">this blog post about the same issue</a> which did not have any answer either.</p>
  
  <p>Am I using <code>distutils</code> wrong? Do I need to subclass <code>distutils.command.install</code> and do the checking/installing myself?</p>