themattrix / docker-tox

Docker base image for running tox with Python 2.6, 2.7, 3.3, 3.4, 3.5, 3.6, 3.7, PyPy, and PyPy3.
MIT License
62 stars 19 forks source link

separate install-prereqs from pip requirements installing #14

Closed davidt99 closed 1 year ago

davidt99 commented 6 years ago

I (and I guess most people) use prereqs.sh script to apt-get install packages that are needed to python requirements. Since both requirements.txt and prereqs.sh are copied in the same layer, any change to the requirements, will cause installation to the prerequisites although nothing is changed in their part. I separated the install requirements and prerequisites to two different copy and run onbuild command. There is a small problem - it's somewhat backwards incompatible if someone was parsing the tox.ini or the requirements.txt in the prereqs script. Despite that, I think this is the better approach and tox is flex enough to run custom script if needed.