<div>pipup has "save to a requirements.txt" functionality</div><a href="https://github.com/revsys/pipup">https://github.com/revsys/pipup</a><div><br></div><div>It looks like it doesn't yet handle hash-checking mode (which is from peep, IIRC):</div><div><br></div><div>- <a href="https://pip.pypa.io/en/stable/reference/pip_install/#hash-checking-mode">https://pip.pypa.io/en/stable/reference/pip_install/#hash-checking-mode</a></div><div>- <a href="https://github.com/revsys/pipup/blob/master/pipup/req_files.py">https://github.com/revsys/pipup/blob/master/pipup/req_files.py</a></div><div><br></div><div>I think str(req_install.InstallRequirement) could/should just work? Or maybe to_requirements_str()?</div><div>- <a href="https://github.com/pypa/pip/blob/master/pip/req/req_file.py">https://github.com/pypa/pip/blob/master/pip/req/req_file.py</a></div><div>- <a href="https://github.com/pypa/pip/blob/master/pip/req/req_install.py">https://github.com/pypa/pip/blob/master/pip/req/req_install.py</a></div><div><br></div><div>pip-tools probably has InstallRequirement.to_requirements_str()?</div><div><br></div><div>- <a href="https://github.com/nvie/pip-tools/blob/master/piptools/writer.py">https://github.com/nvie/pip-tools/blob/master/piptools/writer.py</a></div><div>- <a href="https://github.com/nvie/pip-tools/blob/master/piptools/utils.py">https://github.com/nvie/pip-tools/blob/master/piptools/utils.py</a></div><div> - format_requirement()<br> - format_specifier()<br><br>Round-trip with requirements.txt files would probably be useful<br><br>On Sunday, July 24, 2016, Brett Cannon <<a href="mailto:brett@python.org">brett@python.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Sat, 23 Jul 2016 at 10:36 Daniel Holth <<a href="javascript:_e(%7B%7D,'cvml','dholth@gmail.com');" target="_blank">dholth@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Not yet. Someone should fix that 😎</p></blockquote><div>There is an issue tracking that if someone gets adventurous enough to write up a PR: <a href="https://github.com/pypa/pip/issues/3691" target="_blank">https://github.com/pypa/pip/issues/3691</a> .</div><div><br></div><div>-Brett</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><div class="gmail_quote"><div dir="ltr">On Sat, Jul 23, 2016, 11:37 Alex Grönholm <<a href="javascript:_e(%7B%7D,'cvml','alex.gronholm@nextday.fi');" target="_blank">alex.gronholm@nextday.fi</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
pip doesn't yet support pyproject.toml does it?</div><div bgcolor="#FFFFFF" text="#000000"><br>
<br>
<div>23.07.2016, 17:43, Daniel Holth
kirjoitti:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Here is my attempt. The SConstruct (like a Makefile) builds
the extension. The .toml file gives the static metadata. No
need to put the two in the same file.</div>
<div><br>
</div>
<a href="https://bitbucket.org/dholth/cryptacular/src/tip/SConstruct" target="_blank">https://bitbucket.org/dholth/cryptacular/src/tip/SConstruct</a><br>
<div><br>
</div>
<div><a href="https://bitbucket.org/dholth/cryptacular/src/tip/pyproject.toml" target="_blank">https://bitbucket.org/dholth/cryptacular/src/tip/pyproject.toml</a><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Sat, Jul 23, 2016 at 10:11 AM Alex Grönholm
<<a href="javascript:_e(%7B%7D,'cvml','alex.gronholm@nextday.fi');" target="_blank">alex.gronholm@nextday.fi</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">23.07.2016,
17:04, Thomas Kluyver kirjoitti:<br>
> On Sat, Jul 23, 2016, at 02:32 PM, Alex Grönholm wrote:<br>
>> I'm -1 on this because requirements.txt is not really
the standard way<br>
>> to list dependencies.<br>
>> In the Python world, setup.py is the equivalent of
Node's package.json.<br>
>> But as it is<br>
>> Python code, it cannot so easily be programmatically
modified.<br>
> Packaging based on declarative metadata:<br>
> <a href="http://flit.readthedocs.io/en/latest/" rel="noreferrer" target="_blank">http://flit.readthedocs.io/en/latest/</a><br>
> </blowing_own_trumpet><br>
><br>
> We have a bit of a divide. Specifying dependencies in
setup.py (or<br>
> flit.ini, or upcoming pyproject.toml) is the standard for
library and<br>
> tool packages that are intended to be published on PyPI
and installed<br>
> with pip. requirements.txt is generally used for
applications which will<br>
> be distributed or deployed by other means.<br>
><br>
> As I understand it, in the Javascript world package.json
is used in both<br>
> cases. Is that something Python should try to emulate? Is
it hard to<br>
> achieve given the limitations of setup.py that you
pointed out?<br>
This topic has been beaten to death. There is no way to cram
the<br>
complexities of C extension compilation setup into purely
declarative<br>
metadata. Distutils2 tried and failed. Just look at the
setup.py files<br>
of some popular projects and imagine all that logic expressed
in<br>
declarative metadata.<br>
> Thomas<br>
> _______________________________________________<br>
> Distutils-SIG maillist - <a href="javascript:_e(%7B%7D,'cvml','Distutils-SIG@python.org');" target="_blank">Distutils-SIG@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/distutils-sig" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/distutils-sig</a><br>
<br>
_______________________________________________<br>
Distutils-SIG maillist - <a href="javascript:_e(%7B%7D,'cvml','Distutils-SIG@python.org');" target="_blank">Distutils-SIG@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/distutils-sig" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/distutils-sig</a><br>
</blockquote>
</div>
</blockquote>
<br>
</div></blockquote></div>
_______________________________________________<br>
Distutils-SIG maillist - <a href="javascript:_e(%7B%7D,'cvml','Distutils-SIG@python.org');" target="_blank">Distutils-SIG@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/distutils-sig" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/distutils-sig</a><br>
</blockquote></div></div>
</blockquote></div>