<div dir="ltr">pbr also supports "environment markers"<div>which we would want to preserve when round-tripping (reading in, modifying, and writing out) requirements.txt files;</div><div>though IDK if environment markers are part of any Python Packaging Spec? <br><div><div><br></div><div>from <a href="http://docs.openstack.org/developer/pbr/#environment-markers">http://docs.openstack.org/developer/pbr/#environment-markers</a> :</div><div><pre style="overflow:auto;padding:10px;color:rgb(85,85,85);line-height:1.2em;border:1px solid rgb(198,201,203);font-size:1.1em;margin-top:1.5em;margin-bottom:1.5em"><span class="gmail-n">argparse</span><span class="gmail-p">;</span> <span class="gmail-n">python_version</span><span class="gmail-o" style="color:rgb(102,102,102)">==</span><span class="gmail-s1" style="color:rgb(64,112,160)">'2.6'</span></pre></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 30, 2016 at 12:50 PM, Wes Turner <span dir="ltr"><<a href="mailto:wes.turner@gmail.com" target="_blank">wes.turner@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>pipup has "save to a requirements.txt" functionality</div><a href="https://github.com/revsys/pipup" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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<div><div class="h5"><br><br>On Sunday, July 24, 2016, Brett Cannon <<a href="mailto:brett@python.org" target="_blank">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>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>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>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>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>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>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></div></div>
</blockquote></div><br></div>