Virtualenv in source management

Perhaps this is more of an opinion-based question, but I was wondering if virtualenv should be included in the GitHub repository. Why should it or shouldn't it be turned on?

+5
source share
1 answer

No, everything that can be created should not be included.

Dependencies should be managed using something like pip, and the requirements.txt file can be included.

The only files under source control should be the files needed to create a development environment. Thus, it can include bot snap, i.e. You can script to create a virtual environment, and this will be the first thing you run after cloning.

Also note that your virtual environment contains binaries. You absolutely do not want those who are in your repository.

As stated in @JeremyBank below, your virtual environment may also vary from system to system, which means that your virtual environment will not be portable.

+8
source

All Articles