Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: parse_pipfile function #47

Open
malikoth opened this issue May 18, 2020 · 4 comments
Open

Feature Request: parse_pipfile function #47

malikoth opened this issue May 18, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@malikoth
Copy link
Contributor

With adoption increasing for Pipfile based dependency declaration, it would be great if this library could parse a Pipfile as well. Nice thing is that since a Pipfile doesn't support nested files like requirements.txt does, and the format of the file is just TOML, it should be a fairly short function that just reuses a lot of the existing functionality.

If this seems reasonable scope for this project, I'll happily submit a PR with it. :)

@di
Copy link
Owner

di commented May 18, 2020

Hi @malikoth, thanks for the feature request.

The purpose of this package to providing a drop-in replacement for existing uses of pip's internal API by wrapping command-line calls to pip. To my knowledge, pip doesn't currently support parsing a Pipfile so there is no equivalent function or class one could import from pip which provides this functionality, so there's nothing for us to replace or wrap.

I think if pip ever begins supporting installing from a Pipfile, there probably would be a need for something like pip_api.parse_pipfile, but until then there's not much to do here I think.

If you just want to be able to parse a Pipfile, I think this project is probably the wrong place for that functionality, and maybe https://pypi.org/project/pipfile/ would make more sense.

@malikoth
Copy link
Contributor Author

Fair enough. I'd been thinking that parse_requirements was more of a feature of this project than a wrapper around pip itself; my bad.

That being said, the Pipfile project does say

Pip Integration (eventual)
++++++++++++++++++++++++++
pip_ will grow a new command line options, -p / --pipfile to install the versions as specified in a Pipfile, similar to its existing -r / --requirement argument for installing requirements.txt files.

In that hypothetical eventual future, maybe we will be adding this in the future. :)

@di
Copy link
Owner

di commented May 18, 2020

Yep! I expect pip to gain this support eventually, so I'll leave this issue open until then.

@malikoth
Copy link
Contributor Author

Or feel free to close, and reopen when / if appropriate.

@di di added the enhancement New feature or request label May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants