Merge "Use recommended twine check for README validation"
This commit is contained in:
commit
c57395f0ee
@ -1774,8 +1774,9 @@ def main():
|
||||
validate_model,
|
||||
validate_release_type,
|
||||
validate_pypi_permissions,
|
||||
validate_pypi_readme,
|
||||
validate_build_sdist,
|
||||
# Check readme after sdist build to slightly optimize things
|
||||
validate_pypi_readme,
|
||||
validate_gitreview,
|
||||
validate_release_sha_exists,
|
||||
validate_existing_tags,
|
||||
|
@ -94,10 +94,16 @@ def check_readme_format(workdir, repo):
|
||||
LOG.debug('did not find %s, maybe %s is not a python project',
|
||||
setup_path, repo)
|
||||
return None
|
||||
|
||||
# Check if the sdist build has been done
|
||||
build_path = os.path.join(dest, 'dist')
|
||||
if not os.path.exists(build_path):
|
||||
build_sdist(workdir, repo)
|
||||
|
||||
# NOTE(dhellmann): This relies on validate being run via tox so
|
||||
# that python3 is present and the docutils package is installed.
|
||||
# that python3 is present and the twine package is installed.
|
||||
processutils.check_call(
|
||||
['python3', 'setup.py', 'check', '--restructuredtext', '--strict'],
|
||||
['twine', 'check', os.path.join(build_path, '*')],
|
||||
cwd=dest,
|
||||
)
|
||||
|
||||
|
@ -21,6 +21,7 @@ prompt_toolkit>=2.0.7
|
||||
tqdm
|
||||
mwclient==0.8.1
|
||||
jsonschema>=2.6.0
|
||||
twine>=1.13.0
|
||||
|
||||
# For release notes generation.
|
||||
Jinja2>=2.6 # BSD License (3 clause)
|
||||
|
Loading…
x
Reference in New Issue
Block a user