I actually maintain a separate library for parsing requirements which relies mainly on packaging and which provides a backing implementation for moving between requirements files and Pipfile format. It relies on some pip internals (InstallRequirement specifically) for avoiding rework. As of recently it also includes some resolution functionality.
I didn’t include a link to the pip shims library because Paul et. al. aren’t happy we are using this stuff to begin with, which I get. However it is also a good representation of things we have needed in multiple projects associated with pipenv (I reimplemented them in piptools and they were picked up in at least one additional project as well). In pipenvs case specifically we wind up installing packages from user input or from a structured file, in either case we want it to succeed. It would be kind of silly to start from point 0 and pretend there is no code behind pip as we construct dependency graphs. We run into some risk of rework on the resolver front. We just finished a stateful, forward looking, backtracking resolver (we checked in with Pradyun but he is quite busy). Dan Ryan // pipenv maintainer gh: @techalchemy > On Aug 20, 2018, at 9:16 AM, Wayne Werner <waynejwer...@gmail.com> wrote: > > > >> On Mon, Aug 20, 2018, 7:45 AM Paul Moore <p.f.mo...@gmail.com> wrote: >> On Mon, 20 Aug 2018 at 13:21, Wes Turner <wes.tur...@gmail.com> wrote: >> > >> > Something as simple as reading a requirements.txt file into JSON must >> > either reimplement or wrongly import from pip._internal. >> >> Or copy pip's code and maintain it locally... >> >> > Anyways, >> > Tool authors reimplementing in particular the requirements.txt >> > functionality shouldn't be necessary. >> >> Agreed. Maybe someone should write a package to handle >> requirements.txt reading API. > > > Or as pipenv does, abort that issue entirely in favor of a toml file because > that's the future, right? :) > > -W > -- > Distutils-SIG mailing list -- distutils-sig@python.org > To unsubscribe send an email to distutils-sig-le...@python.org > https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/ > Message archived at > https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/FJFQNINEKKUNFN5TGYROYFS7LPBF6XN5/
-- Distutils-SIG mailing list -- distutils-sig@python.org To unsubscribe send an email to distutils-sig-le...@python.org https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/ Message archived at https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/5IWQZ4HAFKPMOYWDQYEPEYN72OGHRVBR/