Fix package building failure due to empty description

Adds descriptions and avoid twine check failure when the sdist package
was build via python3. It seems that sdist command produce different
packages in this unique case where Description field becomes False
instead of UNKNOWN.

This also adds new dist tox targets that tests that packaging works
well. On CI we have diffent job that does almost the same thing.

Change-Id: I93300e49b80fc170c1b73ffb5540cd42754e6a21
This commit is contained in:
Sorin Sbarnea 2018-11-08 18:42:17 +00:00
parent 751fc1b7f5
commit 7bc805ef08
4 changed files with 17 additions and 1 deletions

2
.gitignore vendored
View File

@ -2,6 +2,8 @@
# Distribution / packaging
*.egg*
build/
dist/
# Testing
.cache

View File

@ -1,6 +1,9 @@
[metadata]
name = browbeat
summary = OpenStack Performance Tooling
description-file =
README.rst
description-content-type = text/plain; charset=UTF-8
author = OpenStack
author-email = openstack-dev@lists.openstack.org
home-page = http://www.browbeatproject.org/

View File

@ -9,6 +9,7 @@ pykwalify
coverage>=3.6
pytest==3.2.1
python-subunit>=0.0.18
readme_renderer[md]
sphinx>=1.3,!=1.6.1
oslosphinx>=2.5.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
@ -16,3 +17,4 @@ sphinx_rtd_theme
testrepository>=0.0.18
testscenarios>=0.4
testtools>=1.4.0
twine

11
tox.ini
View File

@ -1,6 +1,6 @@
[tox]
minversion = 2.0
envlist = py27,py35,py36,linters
envlist = py27,py35,py36,linters,dist
skipsdist = True
[testenv]
@ -26,6 +26,15 @@ commands =
bash -c "set -e; for config in $(ls conf/); do \
echo conf/$config; pykwalify -d conf/$config -s browbeat/schema/browbeat.yml; done"
[testenv:dist]
basepython = python3
# reuse linters environment to lower footprint on dev machines
envdir = {toxworkdir}/linters
# test that we can build a valid package
commands =
python setup.py sdist bdist_wheel
python -m twine check dist/*
[testenv:pep8]
commands = flake8 {posargs}