cookiecutter-pylibrary
cookiecutter-pylibrary copied to clipboard
Fix deprecation warning of `setup.py check`
Inspired by how it got fixed in https://github.com/pyca/cryptography/issues/4523 Fixes #108
This always gives an error after you've produced the doc in dist/docs, right?
Checking distribution dist/docs: InvalidDistribution: Unknown distribution format: 'docs'
Yeah dist/docs is a problem. I wish there was another way of doing this. Twine, an upload tool, is the wrong place to do this check.
Either way, even if twine could be the right tool the check env is not meant to build dists, and twine check would only test one of the dists - which is inadequate.
To really solve this pylibrary needs a way to automate publishing (and then piggyback twine check on top of that).
Btw it was deprecated in this ninja change: https://github.com/pypa/readme_renderer/pull/122 - devoid of any discussion or explanation.
This is still on my todo list. Just need to figure out a clean way do do it cross-platform (like using some tmp dir) without mucking about in the dist folder which might have other dists there.
This always gives an error after you've produced the doc in dist/docs, right?
Checking distribution dist/docs: InvalidDistribution: Unknown distribution format: 'docs'
You could always specify a file extension pattern, and then it will work (with ignoring docs) ...
E.g.: twine check dist/*.{whl,gz}
I found that twine check
is slightly more strict than python setup.py check [...]
.
But it might still check all possible distributions regardless of environment, so not sure in case of errors.