September 2017
Intermediate to advanced
222 pages
5h 1m
English
Believe it or not, we are almost done with our plugin. From the command line, we can use this setup.py file to create a distribution:
| | $ cd /path/to/code/ch5/pytest-nice |
| | $ python setup.py sdist |
| | running sdist |
| | running egg_info |
| | creating pytest_nice.egg-info |
| | ... |
| | running check |
| | creating pytest-nice-0.1.0 |
| | ... |
| | creating dist |
| | Creating tar archive |
| | ... |
| | $ ls dist |
| | pytest-nice-0.1.0.tar.gz |
(Note that sdist stands for “source distribution.”)
Within pytest-nice, a dist directory contains a new file called pytest-nice-0.1.0.tar.gz. This file can now be used anywhere to install our plugin, even in place:
| | $ pip install dist/pytest-nice-0.1.0.tar.gz |
| | Processing ./dist/pytest-nice-0.1.0.tar.gz ... |
Read now
Unlock full access