Metadata-Version: 2.1
Name: publish
Version: 0.3.1
Summary: Publish python package to PyPI and Github
Home-page: https://github.com/fiaas/publish
Author: FiaaS developers
Author-email: fiaas@googlegroups.com
License: Apache License
Keywords: pypi github fiaas
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: System :: Software Distribution
Requires-Dist: six (==1.12.0)
Requires-Dist: GitPython (==2.1.11)
Requires-Dist: twine (==1.12.1)
Requires-Dist: githubrelease (==1.5.8)
Provides-Extra: codacy
Requires-Dist: codacy-coverage ; extra == 'codacy'
Provides-Extra: dev
Requires-Dist: tox (==3.6.1) ; extra == 'dev'
Requires-Dist: mock (==2.0.0) ; extra == 'dev'
Requires-Dist: pytest (==4.0.2) ; extra == 'dev'
Requires-Dist: pytest-cov (==2.6.0) ; extra == 'dev'
Requires-Dist: pytest-html (==1.19.0) ; extra == 'dev'
Requires-Dist: pytest-sugar (==0.9.2) ; extra == 'dev'
Requires-Dist: prospector ; extra == 'dev'
Provides-Extra: docs
Requires-Dist: Sphinx (>=1.6.3) ; extra == 'docs'

publish - Tool to create a release of a Python package
======================================================

|Codacy Quality Badge| |Codacy Coverage Badge|


.. |Codacy Quality Badge| image:: https://api.codacy.com/project/badge/Grade/bd7d31c7ceac43eb81884b2adc4ba3ed
    :target: https://www.codacy.com/app/fiaas/publish?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=fiaas/publish&amp;utm_campaign=Badge_Grade
.. |Codacy Coverage Badge| image:: https://api.codacy.com/project/badge/Coverage/bd7d31c7ceac43eb81884b2adc4ba3ed
    :target: https://www.codacy.com/app/fiaas/publish?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=fiaas/publish&amp;utm_campaign=Badge_Coverage

publish is a tool to package and release a python project. It will create a changelog and upload artifacts to Github and PyPI.

It is created for and by the `FIAAS project`_, and used for most of our projects.

.. _`FIAAS project`: https://github.com/fiaas


Usage
-----

In order to use publish, you must first install it::

    pip install publish


Under the covers, publish uses github-release_ and twine_ to do most of the work, and those tools require credentials for Github and PyPI to be available in environment variables::

    export GITHUB_TOKEN=gh-token
    export TWINE_USERNAME=pypi-user
    export TWINE_PASSWORD=pypi-pass

In order to know where to upload the artifacts, you must specify an organization, and a repository::

    publish fiaas k8s


Before uploading anything, publish will verify that the current checkout is suitable to be released, and checks the following items:

* Are all files either ignored or in version control?
* Is every change committed?
* Is the currently checked out code tagged with an annotated tag?
* Does that tag use the convention ``v<major>.<minor>.<bugfix>``?

If the answer to all of these is yes, the name of the tag is used as the version to release. A changelog is generated from the git log, source tarballs and wheels are built, the release is created in Github and PyPI, and the files are uploaded.

.. _github-release: https://github.com/j0057/github-release
.. _twine: https://github.com/pypa/twine


Changes since last version
--------------------------

* `84b47e4`_: Use correct regex for matching tags for auto-promotion
* `6764d18`_: Ignore .pip_cache
* `aab6990`_: Explain more about why a repo is deemed unfit for release

.. _84b47e4: https://github.com/fiaas/publish/commit/84b47e4
.. _6764d18: https://github.com/fiaas/publish/commit/6764d18
.. _aab6990: https://github.com/fiaas/publish/commit/aab6990

