From 45cf1ea8ec9fb4c046270ff1942c56bab7b308ea Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Fri, 7 Feb 2020 15:22:07 +0000 Subject: [PATCH] Configure packaging and release Configures Travis so we can release tags. --- .gitignore | 1 + .travis.yml | 14 ++++++++++++++ setup.cfg | 1 + tox.ini | 26 ++++++++++++++++++++++++-- 4 files changed, 40 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e2ed9b7..f1fde8a 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,4 @@ doc/build/ # pbr stuff AUTHORS ChangeLog +.eggs diff --git a/.travis.yml b/.travis.yml index 5209de3..cfb8ad4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,6 +32,20 @@ jobs: - name: py27 python: "2.7" env: TOXENV=py27 + - name: packaging + python: "3.6" + env: TOXENV=packaging + +deploy: + provider: pypi + username: __token__ + password: + secure: "fSEPPa9lkEiqNZKMs0qCdI3gSWYSoqjj+gk33bvZXpWvIYkrRGNYt77be6lAdNX4SBW2LaaHmAd8WZ9YuaYTfTfNksn25mSjOKw3yEhmus9V7r5VmLyODIlhuDmn+RGenzf1wKEXKdBJQ8qXjzH1R2MbagIEjApyTWTYX4tfjoMR5v41g+wP4VC9wwjQx6q7oZhwQWj/9nSw8Ww45By1ozH2E4oT5bGSS/guXxuLsQ+oUfQfe+9Ht8kiT4n7RbfHyYQTe3VjV1IZ0hhiiA/SxF0UwsPt4Lr242W59TkaGayWjbSNCv7REQQXyHGKLcns5C50eD3Up6ZDmehOpiGf8TUCwb7FuAi71lD+Rr6Uu7IY44nUlsCDeQ9/sqKGWLsJSZgf4mBYJBqSx9GD+1eqmBPx/AONbVTUdhWh2Ve+JfXztfBeJpdKmmUsRC3CjqbIf8UKNDz5zcuUJ7yv4o0V+SunUDSdMOxkYaW9tP4YwJQqwCpNOi5R80JjhJq4bwvjdhGatC7oLDuoZ17R7b9OrBT8TpaXr/R+rgC66AHxmC/qgxZf4z7he+6vtmJPnVNUDzKj24t0wPVHprZkCSkLPf00gFU4UvG+J2OTCaHEImHtL5dp2wv+NgQbnm5d6xCUb80LW38AGx6E46potk+mnkMM1P4+W1tmtoYkDX6eIB0=" + edge: true # opt in to dpl v2 + distributions: "sdist bdist_wheel" + skip_existing: true + on: + tags: true env: global: diff --git a/setup.cfg b/setup.cfg index 55c110f..b8dad36 100644 --- a/setup.cfg +++ b/setup.cfg @@ -8,6 +8,7 @@ author_email = openstack-discuss@lists.openstack.org maintainer = PyCQA maintainer_email = code-quality@python.org home-page = https://github.com/pycqa/doc8 +long_description_content_type = text/x-rst classifier = Intended Audience :: Information Technology Intended Audience :: System Administrators diff --git a/tox.ini b/tox.ini index f249b1b..a345b00 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,13 @@ [tox] -minversion = 1.6 -envlist = lint,py{27,35,36,37},docs +minversion = 3.8 +envlist = lint,py{27,35,36,37},docs,packaging [testenv] deps = -r{toxinidir}/test-requirements.txt commands = nosetests {posargs} +whitelist_externals = + rm [testenv:lint] deps = @@ -19,3 +21,23 @@ deps = commands = doc8 -e .rst doc CONTRIBUTING.rst README.rst sphinx-build -W -b html doc/source doc/build/html + +[testenv:packaging] +description = + Do packagin/distribution. If tag is not present or PEP440 compliant upload to + PYPI could fail +# `usedevelop = true` overrides `skip_install` instruction, it's unwanted +usedevelop = false +# don't install molecule itself in this env +skip_install = true +deps = + collective.checkdocs >= 0.2 + pep517 >= 0.5.0 + twine >= 1.14.0 +setenv = +commands = + rm -rfv {toxinidir}/dist/ + python setup.py sdist bdist_wheel + # metadata validation + python -m setup checkdocs --verbose + python -m twine check {toxinidir}/dist/*