4 ms·
I'd like something like `npm install --save Django` -- a command that finds the most recent stable version of Django, and then adds _that_ package to requiremen
by civilian 10y ago
I'd like something like `npm install --save Django` -- a command that finds the most recent stable version of Django, and then adds _that_ package to requirements.txt, and leaves Django's dependencies out of reqs.txt.
I know that it's just a few simple operations for me to do it myself, but npm has spoiled me.
- deleted 10y ago[deleted]
- INTPenis 10y agoIf I'm reading you correctly, the missing feature in pip is to list dependencies for one package so they can be put into requirements.txt. This is a missing feature, there are various hacks but nothing concrete. If you're working on a large project you have to keep track of all your dependencies and preferably only add the main dependency, not its dependencies, into requirements. I tend to avoid doing pip freeze > requirements.txt because it lists packages I know shouldn't be in requirements.
- morgante 10y agoI think you misunderstood. Like civilian, my main ask for an improved pip would be a way to save a single explicit package into my requirements.txt by adding a --save flag when installing it. I don't want to include sub-dependencies in my requirements.txt.
- INTPenis 10y agoI believe I follow. The way to maintain requirements.txt with single dependencies (base dependencies maybe, I'm self-taught on the lingo), is to manually add them one by one. Pip freeze is useless because it adds a lot of things you don't need into requirements, making it cluttered and hard to follow.
- morgante 10y agoYes, I (and civilian) know that. The point is that it's comparatively cumbersome. You have to manually add the specific version into requirements.txt instead of being able to automatically save it as you install.
- pauly 10y agopackage.json makes so much sense to me, npm has spoiled me also