Skip to content

Commit 3da9017

Browse files
committed
fix: PyPi description parsing
setup.py test has been deprecated pypa/setuptools#1684 in favour of twine test. This commit removes the existing use of setup.py test when checking the README has been parsed properly and replace it with twine test.
1 parent fc2d894 commit 3da9017

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

requirements/develop.pip

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ invoke==1.3.0
22
flake8==3.7.8
33
readme-renderer==24.0
44
tox==3.13.2
5+
twine==1.15.0

tasks.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,12 @@ def qa(ctx):
157157
else:
158158
success('No linter errors')
159159
info('Ensure PyPI can render README and CHANGELOG')
160-
readme_results = ctx.run('python setup.py check -r -s', pty=True, warn=True, hide=True)
160+
info('Building dist package')
161+
dist = ctx.run('python setup.py sdist', pty=True, warn=False, hide=True)
162+
if dist.failed:
163+
error('Unable to build sdist package')
164+
exit('Quality check failed', dist.return_code)
165+
readme_results = ctx.run('twine check dist/*', pty=True, warn=True, hide=True)
161166
if readme_results.failed:
162167
print(readme_results.stdout)
163168
error('README and/or CHANGELOG is not renderable by PyPI')

0 commit comments

Comments
 (0)