diff --git a/Makefile b/Makefile index b15649e2..7ba735dd 100644 --- a/Makefile +++ b/Makefile @@ -7,3 +7,17 @@ lint: test: @npm run build @coverage run --source=pyca --omit='*.html' -m unittest discover -s tests + +build: + @npm ci + @npm run build + +pypi: clean build + @python setup.py sdist + @printf "\nUpload to PyPI with \"twine upload dist/$$(python setup.py --fullname).tar.gz\"\n" + +clean: + @python setup.py clean --all + @rm -rf node_modules pyca/ui/static + +PHONY: all lint test build pypi clean diff --git a/docs/pypi.rst b/docs/pypi.rst new file mode 100644 index 00000000..a7c308ed --- /dev/null +++ b/docs/pypi.rst @@ -0,0 +1,20 @@ +Upload to PyPI_ +=============== + +The ``Makefile`` includes a ``pypi`` target which builds a clean PyCA package. + +So you can simply call + +.. code-block:: bash + + make pypi + +to build a clean package. + +The built package should be found under ``dist`` and can be uploaded to PyPI_, e.g. with Twine_. + +For a more detailed explanation about the whole process, take e.g. a look at `Packaging Python Projects`_ + +.. _PyPI: https://pypi.org +.. _Twine: https://pypi.org/project/twine/ +.. _Packaging Python Projects: https://packaging.python.org/tutorials/packaging-projects/ diff --git a/docs/readme.rst b/docs/readme.rst index 1196b64f..52d759e3 100644 --- a/docs/readme.rst +++ b/docs/readme.rst @@ -40,3 +40,8 @@ API --- - `API Documentation `_ + +Developer Information +--------------------- + +- `Upload to PyPI `_