<div dir="ltr">This is a common mistake. The parenthesis are a Metadata 1.2+ thing. Omit them for distutils.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 11, 2013 at 2:22 PM, Erik Bernoth <span dir="ltr"><<a href="mailto:erik.bernoth@gmail.com" target="_blank">erik.bernoth@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class="h5"><br><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 11, 2013 at 8:07 PM, Daniel Holth <span dir="ltr"><<a href="mailto:dholth@gmail.com" target="_blank">dholth@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">

<div><div>On Mon, Feb 11, 2013 at 1:10 PM, Erik Bernoth <span dir="ltr"><<a href="mailto:erik.bernoth@gmail.com" target="_blank">erik.bernoth@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi everybody,<div><br></div><div>I think I pretty much read all of the <a href="http://docs.python.org/2/distutils/" target="_blank">http://docs.python.org/2/distutils/</a> and started to create a pypi repository for my project (<a href="http://pypi.python.org/pypi/monk_tf" target="_blank">http://pypi.python.org/pypi/monk_tf</a>). Now there are some things that are not so clear from the documentation, with the most important being requirement handling.</div>



<div><br></div><div>I have the same requirements written down in two ways:</div><div> a) a requirements.txt file, which can be called with pip install -r requirements.txt. Yet I don't see any user downloading a requirements.txt file from somewhere, then installing it and only then afterwards getting started with actually installing the package they want to install. Who would do that?</div>



<div><br></div><div> b) requires attribute in the setup function call in setup.py. For some reason pip completely seems to ignore it. I tested the following way (come along with the code from <a href="https://github.com/DFE/MONK" target="_blank">https://github.com/DFE/MONK</a>, if you like):</div>



<div><br></div><div>    $ cd MONK</div><div>    $ python setup.py sdist</div><div>    $ cd dist</div><div>    $ tar xfvz monk_tf-v0.1.1.tar.gz</div><div>    $ cd monk_tf-v0.1.1</div><div>
    $ python setup.py install</div><div><div>    running install</div><div>    running build</div><div>    running build_py</div><div>    running install_lib</div><div>    running install_egg_info</div><div>    Writing /usr/local/lib/python2.7/dist-packages/monk_tf-v0.1.1.egg-info</div>



</div><div>    $python</div><div>    >> import monk_tf</div><div>    (Exception, because a required package can't be found)</div><div><br></div><div>So this also didn't seem to install any of the required packages.</div>



<div><br></div><div>I'd really like to know, what I am doing wrong here. Anybody ideas or suggestions? Is there another way to tell distutils about the packages that should be installed before my package is installed?</div>



<div><br></div><div>Cheers</div><span><font color="#888888"><div>Erik<br></div></font></span></div></blockquote><div><br></div></div></div><div>Generally requires.txt is for specific versions of dependencies and the setup.py list is more permissive.<br>


<br></div><div>Try using pip to install your sdist instead of running setup.py directly. <br></div></div><br></div></div>
</blockquote></div><br></div></div></div><div class="gmail_extra">Hi Daniel,</div><div class="gmail_extra"><br></div><div class="gmail_extra">I also tried ``pip install monk_tf-v0.1.1.tar.gz``, with the same result as using setup.py directly. He installs it but doesn't consider the "requires" list.</div>

<div class="gmail_extra">From your mail I would interprete that distutils actually should consider the required packages? Maybe I just wrote something incorrectly.</div><div class="gmail_extra">Does the following look like a correct statements of the requires parameter?</div>

<div class="gmail_extra">--------------------------------------------------------------</div><div class="gmail_extra">  [...]</div><div class="gmail_extra">    package_dir = { '' : src_path },</div>
<div class="gmail_extra">    requires = [</div><div class="gmail_extra">        'pylibssh2 (==1.0.1)',</div><div class="gmail_extra">        'pyserial (==2.5)'</div><div class="gmail_extra">    ],provides = [</div>

<div class="gmail_extra">        '{} ({})'.format(project, version)</div><div class="gmail_extra">    ]</div><div class="gmail_extra">  [...]<br></div><div class="gmail_extra">--------------------------------------------------------------<br>

</div><div class="gmail_extra"><br></div><div class="gmail_extra">Cheers</div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra">Erik</div></font></span></div>
</blockquote></div><br></div>