Welcome to twine’s documentation!¶
Twine is a utility for interacting with PyPI.
Currently it only supports registering projects and uploading distributions.
The goal is to improve PyPI interaction by improving security and
testability. Ideally, pip
and twine
will merge into a single
tool.
Please see the GitHub repository for code and more documentation,
and the Python Packaging User Guide for user documentation. You can
also join #pypa
or #pypa-dev
on Freenode, or the pypa-dev
mailing list, to ask questions or get involved.
Contents:
Getting Started¶
We are happy you have decided to contribute to twine.
It is important to keep your development environment isolated, so that twine and its dependencies do not interfere with packages already installed on your machine. We will use a virtual environment for the development environment for twine. You can use virtualenv or pipenv to isolate your development environment.
Clone the twine repository from GitHub, and then activate your virtual environment. Then, run the following command:
pip install -e /path/to/your/local/twine
Now, in your virtual environment, twine
is pointing at your local copy, so
when you have made changes, you can easily see their effect.
Testing¶
Tests with twine are run using tox, and tested against the following Python versions: 2.7, 3.4, 3,5, and 3.6. To run these tests locally, you will need to have these versions of Python installed on your machine.
If you are using pipenv
to manage your virtual environment, you
may need the tox-pipenv plugin so that tox can use pipenv
environments instead of virtualenvs.
Building the documentation¶
Additions and edits to twine’s documentation are welcome and appreciated. To build the docs locally, first set up a virtual environment and activate it, using Python 3.6 as the Python version in the virtual environment. Example:
mkvirtualenv -p /usr/bin/python3.6 twine
Then install tox
and build the docs using tox
:
pip install tox
tox -e docs
The HTML of the docs will be visible in this directory: twine/docs/_build/
.
When you have made your changes to the docs, please lint them before making a pull request. To run the linter from the root directory:
doc8 docs