Testing Python Packages with Docker
Package management is hard. Sometimes in Python package development, your local (development) environment may behave a little differently than a deployment target. Below is a simple method I use to replicate a clean environment and test Python package installs and tests.
docker run -v `pwd`:`pwd` -w `pwd` python pip install . docker run -v `pwd`:`pwd` -w `pwd` python python setup.py install docker run -v `pwd`:`pwd` -w `pwd` python python setup.py test
First, we bind the current directory to our container (
-v) and switch our working directory (
Second, we run our commands.
- How I Hired a Senior Full-stack Developer in Colombia through VanHack
- AON3D Takes Part in Code Life Ventilator Challenge to Help Ease the COVID Crisis
- Pybotics: Python Toolbox for Robotics
- Start a Simple Web Server
- Improved Test Methods for Polymer AM Inter-Layer Weld Strength and Filament Mechanical Properties