I have a pretty big Python package I've written, about 3500 statements, with a robust unit and acceptance test suite. I feel quite confident about the quality of the code itself, but I'm uneasy about the install process going smoothly for users of the package as I don't know how to reliably test the install in an appropriately isolated environment, short of something like keeping a spare machine around and re-imaging it with a fresh OS install for each test run.
I suspect using virtualenv in the right way might provide a proper test fixture for testing installation, but after extended web searches have uncovered no helpful guidance.
How can I effectively test my setup.py and other installation bits on my development machine?
If you like tools (which I do) check out fabric and the set of Fabric tasks I've written across all my projects:
e.g: circuits' fabfile
This should work for just about any Python project and utilizes:
Some basic workflows:
Type:
fab -l
for a list of commands andfab help:<name>
for help on any command.Update: Recently we added
fab docker
commands to work with Docker