cookiecutter-pylibrary icon indicating copy to clipboard operation
cookiecutter-pylibrary copied to clipboard

Fix deprecation warning of `setup.py check`

Open bagerard opened this issue 5 years ago • 6 comments

Inspired by how it got fixed in https://github.com/pyca/cryptography/issues/4523 Fixes #108

bagerard avatar Jan 06 '19 21:01 bagerard

This always gives an error after you've produced the doc in dist/docs, right?

Checking distribution dist/docs: InvalidDistribution: Unknown distribution format: 'docs'

janluke avatar Mar 25 '19 21:03 janluke

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.

ionelmc avatar Jul 26 '19 11:07 ionelmc

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).

ionelmc avatar Jul 26 '19 11:07 ionelmc

Btw it was deprecated in this ninja change: https://github.com/pypa/readme_renderer/pull/122 - devoid of any discussion or explanation.

ionelmc avatar Jul 26 '19 11:07 ionelmc

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.

ionelmc avatar Nov 11 '19 13:11 ionelmc

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.

Querela avatar Dec 24 '20 00:12 Querela