<div dir="ltr">Sorry, I didn't know that this is not part of distutils. In my understanding pip, setup.py and so on is all part of distutils. Should I have asked my question on another mailing list? Then even more thanks for the great help!<div class="gmail_extra">
<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 11, 2013 at 8:55 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Not really. Install_requires is a setup tools/distribute feature.</p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Feb 11, 2013 2:52 PM, "Erik Bernoth" <<a href="mailto:erik.bernoth@gmail.com" target="_blank">erik.bernoth@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Yes, now it works! Thanks a lot! Last but not least, could you point me in the correct direction to add a patch for the distutils documentation, explaining this more clearly?</div><div class="gmail_extra">
<br>

<br><div class="gmail_quote">On Mon, Feb 11, 2013 at 8:34 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div dir="ltr">Try install_requires = [ the list you have already without () ] <br><span><font color="#888888"><br>Daniel<br></font></span></div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Feb 11, 2013 at 2:32 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">I basically follow the tutorial in the distutils docs, which is a little unclear to me in some points.<div>



<br></div><div>If I do as you say it looks like this:</div><div><div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px">
--------------------------------------------------------------</div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px">  [...]</div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px">




    package_dir = { '' : src_path },</div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px">    requires = [</div></div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px">




        'pylibssh2==1.0.1',</div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px">        'pyserial==2.5'</div><div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px">




    ],provides = [</div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px">        '{} ({})'.format(project, version)</div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px">




    ]</div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px">  [...]<br></div><div class="gmail_extra" style="font-family:arial,sans-serif;font-size:13px">--------------------------------------------------------------</div>




</div></div><div>And the result of ``$ python setup.py sdist`` is:</div><div><br></div><div>    [...] # exception stack</div><div>    ValueError: expected parenthesized list: '==1.0.1'<br></div><div>
<br></div><div>That also happens if I add spaces between project name and comparator.</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 11, 2013 at 8:24 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This is a common mistake. The parenthesis are a Metadata 1.2+ thing. Omit them for distutils.<br></div>



<div>
<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><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><font color="#888888"><div class="gmail_extra">Erik</div></font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</blockquote></div>
</div></div></blockquote></div><br></div></div>