stevegrunwell / asimov

Automatically exclude development dependencies from Apple Time Machine backups
MIT License
1.62k stars 93 forks source link

Feature request: add `venv requirements.txt` #63

Closed huyz closed 3 years ago

huyz commented 4 years ago

It's very common for people to create a venv or .venv folder, using virtualenv or python -m venv, alongside the requirements.txt file for Python

    'venv requirements.txt'       # virtualenv (python)
    '.venv requirements.txt'      # virtualenv (python)
akermen commented 3 years ago

also '.virtualenv' and 'virtualenv' folders and not just 'requirements.txt' but 'requirements.*.txt (requirements.test.txt, requirements.prod.txt)

huyz commented 3 years ago

Too bad there isn't a consensus on naming. So this message here is purely my opinion.

I think that .virtualenv and virtualenv are not common. I have never seen these.

If you want to see a list of common ones, take a look at https://github.com/github/gitignore/blob/master/Python.gitignore :

.env
.venv
env/
venv/
ENV/

Also, I've seen requirements-*.txt and never requirements.*.txt

In any case, we probably need some sort of configuration file.

djay commented 3 years ago

There is a pyvenv.cfg file created - https://docs.python.org/3/library/venv.html

There will also be a lib/python/site-packages/.[dist-info|egg-info]. I'm not sure if there is a way to differentiate between this and global site-packages however.