Skip to content

Commit

Permalink
Add instructions for releasing a package
Browse files Browse the repository at this point in the history
  • Loading branch information
omarkohl committed Oct 7, 2018
1 parent ba620ae commit d21d2b8
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,28 @@ Contributions are very welcome. Tests can be run with `tox`_. Please
ensure the coverage stays at least the same before you submit a pull
request.

To create and upload a new package first update the version number and then:

.. code-block:: bash
pip3 install --user -U twine
make clean
make dist
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
# Verify the package is usable
virtualenv -p python3 test-venv
test-venv/bin/pip install --index-url https://test.pypi.org/simple/ pytest-datafiles
# Create some test_example.py (e.g. with one of the examples above)
test-venv/bin/pytest test_example.py
# Set the git tag for final release
git tag -a 2.0
git push --tags
# Upload the package for final release
twine upload dist/*
Of course this will only work if you have the necessary PyPI credentials for
this package.


License
-------
Expand Down

0 comments on commit d21d2b8

Please sign in to comment.