<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 17, 2017 at 11:34 AM, Thomas Güttler <span dir="ltr"><<a href="mailto:guettliml@thomas-guettler.de" target="_blank">guettliml@thomas-guettler.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Am 16.01.2017 um 18:06 schrieb Jim Fulton:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
<br>
On Mon, Jan 16, 2017 at 11:03 AM, Thomas Güttler <<a href="mailto:guettliml@thomas-guettler.de" target="_blank">guettliml@thomas-guettler.de</a> <mailto:<a href="mailto:guettliml@thomas-guettler.de" target="_blank">guettliml@thomas-guett<wbr>ler.de</a>>> wrote:<br>
<br>
<br>
<br>
Am 13.01.2017 um 16:25 schrieb Jim Fulton:<br>
<br>
<br>
<br>
On Fri, Jan 13, 2017 at 7:23 AM, Thomas Güttler <<a href="mailto:guettliml@thomas-guettler.de" target="_blank">guettliml@thomas-guettler.de</a><br></span>
<mailto:<a href="mailto:guettliml@thomas-guettler.de" target="_blank">guettliml@thomas-guett<wbr>ler.de</a>> <mailto:<a href="mailto:guettliml@thomas-guettler.de" target="_blank">guettliml@thomas-guett<wbr>ler.de</a><span class=""><br>
<mailto:<a href="mailto:guettliml@thomas-guettler.de" target="_blank">guettliml@thomas-guett<wbr>ler.de</a>>>> wrote:<br>
<br>
What is an application for you?<br>
<br>
<br>
Another way to think about this, FWIW, is to distinguish between the "whole system" (for which "Application" is<br>
often a<br>
useful shorthand), as opposed to components (aka libraries).<br>
<br>
It's important for components to be flexible, so they're typically very flexible about versions of their<br>
dependencies.<br>
<br>
For whole systems, OTOH, it's important that once a configuration is tested, that the same configuration is used in<br>
production, so systems typically pin all of their dependencies, ideally extending to their environments (which is a<br>
reason why container technology is attractive).<br>
<br>
<br>
Yes, install_requires in setup.py should define flexible dependencies, but requirements.txt should define fixed<br>
dependencies via fixed version.<br>
<br>
Do you agree with my sentence from above?<br>
<br>
<br>
Are you speaking of a component/library or whole system?<br>
</span></blockquote>
<br>
I am speaking of both. And: I think requirements.txt is optional.</blockquote><div><br></div><div>Then I disagree with your statement. :)</div><div><br></div><div>I should stop, but I'll take one more stab at this.</div><div><br></div><div>It matters whether you're talking about components(/libraries) or whole systems (/applications).</div><div><br></div><div>For components:</div><div><br></div><div>Consumers of a component need to be able to to determine the component's dependencies. The component uses install_required (and extras_require) for this. The version specifications in these dependencies should be as flexible as possible, to allow reuse in as many whole systems as possible.</div><div><br></div><div>Developers of a component will use tools like pip and buildout to automate their development activities. For pip, that will usually entail one or more requirements.txt files. For buildout, that will entail one or more (for different development activities) buildout configs and a single versions.cfg.</div><div><br></div><div>For whole systems:</div><div><br></div><div>Many whole systems only assemble components. For these systems, there is no setup.py file (no python project).</div><div><br></div><div>If a whole system includes a Python project (that isn't distributed separately), it's a matter of taste how much information is included in setup.py. Personally, I would treat the Python project like a component project and include its direct dependencies and minimal version constraints.</div><div><br></div><div>Typically a whole system managed with pip will use a requirements.txt file (or possibly multiple) and a system developed with buildout will have a buildout config and a versions config.</div><div><br></div><div>A whole system could fix all of its dependent versions in install_requires in a setup script, but that would be cumbersome. By using requirements.txt or a buildout versions config, a developer can avail themselves of automation to help maintain the files.</div><div><br></div><div>Jim</div></div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Jim Fulton<br><a href="http://jimfulton.info" target="_blank">http://jimfulton.info</a><br></div>
</div></div>