On Thu, Apr 25, 2019 at 2:38 PM Cameron Simpson <c...@cskk.id.au> wrote: > > On 25Apr2019 12:05, Chris Angelico <ros...@gmail.com> wrote: > >> venv-requirements.txt > >> Periodically I run "pip freeze >venv-requirements.txt"; this file is > >> revision controlled. That way I can rebuild an equivalent venv > >> somewhere else later. > > > >Any particular reason for this name? If not, I would generally > >recommend calling it "requirements.txt", as this is a minor > >convention. For instance, Heroku will recognize the presence of this > >file as an indication that this is a Python app, and will > >automatically "pip install -r requirements.txt" as part of deployment. > > > >Otherwise, I broadly agree with your directory structure (although I > >won't bother with a lib/python directory most of the time). > > Both of these stem from not working only in Python. For example today > I've working on a project with a Python/PostgreSQL backend+cli, and a > javascript frontend. > > The "venv-requirements.txt" makes it clear that it is for the venv > directory, and it also sorts nicely together in the directory listing.
That's fair; OTOH, these are the project's dependencies, which is nothing to do with whether you're using a venv or not. Doesn't make a lot of difference (unlike NPM's package.json, which absolutely has to be called that, or tools won't find it), so do whatever makes sense for you. > The lib/python is an old habit, as my home directory has a lib/python > sitting beside my ossifying lib/perl. So I find the extra specificity > useful. And once I've made one or two convenience top level symlinks the > depth doesn't matter for interactive purposes. Ossifying doesn't mean "turning into Open Source Software", but I know I've had messy directories sitting around as I OSS-ify something :) ChrisA -- https://mail.python.org/mailman/listinfo/python-list