-
Notifications
You must be signed in to change notification settings - Fork 3k
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
pip docs for Requirements files -- issues #1238
Comments
how about this version: https://github.com/qwcode/pip/blob/a8468a6974bd45518cf49f5590d0e4929fda515d/docs/cookbook.rst |
Hi Marcus: In order to understand the role(s) of requirements files, we need to know what produces them and what consumes them. (Just pip? Or do other tools read them too?) I think an introductory statement something like this: "The 'pip install' command takes as its main input a list of modules or packages [that are required and should be installed if not present? to do other things with?]. The user can provide this list on the 'pip install' command line, but as that is tedious and error-prone, pip can instead accept a requirements file [or files?]. A requirements file is simply a text file that lists the items that are required, along with other constraints such as version range [are there constraints other than version?], each item in the same form as a pip command argument. There are three main use cases where requirements files are involved:
(Subsidiary point: qwcode's example wording for this item describes this as a version 'conflict', which technically it is. However, 'conflict' might suggest that the two requirements specify version ranges that are mutually incompatible, which is a different kettle of fish, and thus a red herring, whereas actually they are overlapping.) |
veteran technical writer, are you? ; )
they are compiling multiple requirement specs into one spec, and then placing that combined spec into the one and only requirements file in this user story. The specs live in the "install_requires" metadata in the "setup.py" specification for each project, not in project requirements files. That's a common confusion. I'll add something about that. see my latest version. the changes:
|
Hi Marcus, Thanks for taking time to look at this, especially since you already have work in progress on this front, not to mention other things to do. Your revisions are going in a direction which would have helped me on first reading. And they've flushed out a puzzle that I now realize I'd missed before: 'pip freeze' looks like it's an operation that a developer would do during the packaging process, not something that a recipient of a package would do at the install stage? (If true, this contradicts the expectation that pip is for installing.) I am reluctant to keep pecking away at this detail-by-detail, testing everyone's patience. I think my next step is to try to assemble docs for myself which identify a small number of 'canonical' end-to-end package-deployment-install scenarios which I can then try out, and clearly identify the actual deployable thing(s) in each case, and elaborate how (and with what tools) it's built, how it's shipped, and how it's then installed. (This comment is pretty parallel to my "needs a coherent big picture" comment on https://bitbucket.org/pypa/python-packaging-user-guide/issue/24/suggestions-for-the-packaging-guide-page.) I am pretty convinced it all reduces to a fairly simple picture, but at the moment I'm still floundering in the poor signal-to-noise. |
ok, when you're more sorted, please come back and help pip and the user guide get it's docs in order. help appreciated. as for |
Will try to do just that.
Ah-hah! Thanks for that explanation. So the use case for 'freeze' is that sometimes (often?) the current best deployment practices (setuptools ---> PyPI ---> pip) doesn't succeed in installing a package, or doesn't install it optimally for the user's python arrangement. Evidently, this calls for the user to revise or redo the installation changing something or other. Once that's optimized, then pip freeze can capture that installation configuration so it can be reapplied to either another machine, or to a different python installation (or virtual installation) on the same machine. Unless I overlooked something, that context of such a motivating use case doesn't appear either in the pip doc, nor in the pip discussions at Python Packaging User Guide. Anyhow, thanks for clearing that up. |
closing per #1247 |
Page http://www.pip-installer.org/en/latest/cookbook.html (Title "Cookbook") has some readability issues in the Requirements files section.
The text was updated successfully, but these errors were encountered: