PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Sunday the 20th of July, 2014

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[20:29:07] <ekyr> I would like to use multiple pip requirements files (one for production, and one that contains test dependencies and dev utilities like ipython), and also want to maintain those files with 'pip freeze' (following the advice on the "Ensuring Repeatability" page). However,
[20:29:46] <ekyr> pip freeze outputs all the dependencies currently installed, and I have to split the output by hand, which is tedious and error-prone.
[20:30:49] <ekyr> Has anybody else come up with a way of having all deps versioned explicitly in multiple requirements files and being able to maintain those files over time more easily than doing it by hand.
[20:32:27] <ekyr> It seems to me that it would be desirable if a requirement file could be used as the 'source' for a freeze, and the freeze output would only generate the dependencies in that file (and their dependencies, transitively).
[20:37:36] <ekyr> Then I could freeze with 'requirements.prod.txt' as source and be able to save that as the new version of 'requirements.prod.txt'.
[20:53:15] <nanonyme> ekyr, why is that desirable? Sounds like you'd lose dependency information in your requirements unless you follow dependency trees for everything you use
[20:54:15] <nanonyme> If you actually want to filter output of pip freeze based on a set of modules from a requirements.txt'ish file, that's really trivial to write yourself
[20:54:57] <ekyr> I don't see how you would lose dependency information. If I did 'pip freeze' for 'requirements.prod.txt' and saved that to 'requirements.prod.txt, and the same for 'requirements.dev.txt' and saved that to requirements.dev.txt, those two files would contain all dependencies.
[20:55:38] <nanonyme> Well, what would your original requirements.prod.txt contain?
[20:56:47] <ekyr> It would originally contain just the main things I care about (without their dependencies), so stuff like six, sqlalchemy, and other things that I would manually 'pip install' if I weren't using a requirements file
[20:57:02] <ekyr> but it wouldn't contain their dependencies and wouldn't contain things like ipython, pytest, etc.
[20:57:09] <ekyr> which i won't install in a production environment.
[20:57:28] <ekyr> in my dev environment, i will pip install 'requirements.prod.txt' and 'requirements.dev.txt'
[20:57:33] <ekyr> but in prod, only the first
[20:58:10] <ekyr> do you use just one requirements file?
[20:59:37] <nanonyme> Basicallyy these days, yes. I just use gating so production won't get the requirements.txt until it's tested well enough
[20:59:55] <nanonyme> Seems less effort that maintaining multiple
[21:00:44] <ekyr> Yeah, that is simpler, but I don't like putting stuff like ipython and other things in my production requirements.txt.
[21:01:22] <nanonyme> Well, I don't install ipython anywhere, it seems to unnecessarily complicate things
[21:02:36] <nanonyme> Not that common that when people come asking for solutions to really exotic problems on #python, the root cause ends up being that they were using ipython and the problem vanishes as soon as they stop using it
[21:02:43] <nanonyme> Erm, not that uncommon even
[21:02:55] <ekyr> different tastes for different folks... I personally find the single feature of being able to do 'some_function??' and see the source code of the function invaluable.
[21:03:16] <nanonyme> I use an IDE for that
[21:03:21] <ekyr> And I haven't had any exotic problems either. It's a huge time saver for me.
[21:04:49] <ekyr> Maybe you don't have any libs in your virtualenv/install that don't go into production, but many people do, so it's not really about ipython, as many people will have some development utilities that they don't want in production but want in a requirements file for ease of install.