-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Related: #5855 The description failed to render in the default format of reStructuredText
$ rm -rf ./dist && python3 setup.py sdist && twine upload dist/*
running sdist
running check
F:\Python\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
warning: check: missing meta-data: if 'author' supplied, 'author_email' must be supplied too
warning: sdist: manifest template 'MANIFEST.in' does not exist (using default file list)
writing manifest file 'MANIFEST'
creating fastfilepackage-1.0.6
creating fastfilepackage-1.0.6\source
creating fastfilepackage-1.0.6\source\cppimplementation
creating fastfilepackage-1.0.6\source\fastfilepackage
making hard links in fastfilepackage-1.0.6...
hard linking LICENSE.txt -> fastfilepackage-1.0.6
hard linking README -> fastfilepackage-1.0.6
hard linking README.md -> fastfilepackage-1.0.6
hard linking setup.cfg -> fastfilepackage-1.0.6
hard linking setup.py -> fastfilepackage-1.0.6
hard linking source/cppimplementation\fastfile.cpp -> fastfilepackage-1.0.6\source/cppimplementation
hard linking source/cppimplementation\fastfilewrapper.cpp -> fastfilepackage-1.0.6\source/cppimplementation
hard linking source\fastfilepackage\__init__.py -> fastfilepackage-1.0.6\source\fastfilepackage
hard linking source\fastfilepackage\version.py -> fastfilepackage-1.0.6\source\fastfilepackage
creating dist
Creating tar archive
removing 'fastfilepackage-1.0.6' (and everything under it)
Enter your username: addons_zz
Uploading distributions to https://upload.pypi.org/legacy/
Uploading fastfilepackage-1.0.6.tar.gz
100%|##########| 19.4k/19.4k [00:01<00:00, 16.1kB/s]
NOTE: Try --verbose to see response content.
HTTPError: 400 Client Error: The description failed to render in the default format of reStructuredText. See https://pypi.org/help/#description-content-type for more information. for url: https://upload.pypi.org/legacy/
Contents of fastfilepackage-1.0.6.tar.gz
:
i.e., README.md is present on the package file and its contents are just simple markdown.
$ pip list
Package Version
------------------------ ----------
twine 1.13.0
setuptools 41.0.1
wheel 0.33.4
...
I only manage to upload the package by commenting out these 2 lines:
# long_description = readme_contents,
# long_description_content_type='text/markdown',
https://github.com/evandrocoan/fastfilepackage/blob/master/setup.py
Then, I was able to upload things successfully:
$ rm -rf ./dist && python3 setup.py sdist && twine upload dist/*
running sdist
running check
warning: check: missing meta-data: if 'author' supplied, 'author_email' must be supplied too
warning: sdist: manifest template 'MANIFEST.in' does not exist (using default file list)
warning: sdist: standard file not found: should have one of README, README.txt, README.rst
writing manifest file 'MANIFEST'
creating fastfilepackage-1.0.6
creating fastfilepackage-1.0.6\source
creating fastfilepackage-1.0.6\source\cppimplementation
creating fastfilepackage-1.0.6\source\fastfilepackage
making hard links in fastfilepackage-1.0.6...
hard linking LICENSE.txt -> fastfilepackage-1.0.6
hard linking README.md -> fastfilepackage-1.0.6
hard linking setup.cfg -> fastfilepackage-1.0.6
hard linking setup.py -> fastfilepackage-1.0.6
hard linking source/cppimplementation\fastfile.cpp -> fastfilepackage-1.0.6\source/cppimplementation
hard linking source/cppimplementation\fastfilewrapper.cpp -> fastfilepackage-1.0.6\source/cppimplementation
hard linking source\fastfilepackage\__init__.py -> fastfilepackage-1.0.6\source\fastfilepackage
hard linking source\fastfilepackage\version.py -> fastfilepackage-1.0.6\source\fastfilepackage
creating dist
Creating tar archive
removing 'fastfilepackage-1.0.6' (and everything under it)
Enter your username: addons_zz
Uploading distributions to https://upload.pypi.org/legacy/
Uploading fastfilepackage-1.0.6.tar.gz
100%|##########| 17.3k/17.3k [00:03<00:00, 5.78kB/s]
If I replace distutils.core.setup
by setuptools.setup
everything works fine without having to remove the long_description
and long_description_content_type
lines. But I use distutils.core.setup
instead of setuptools.setup
in my project because I do not know how to build Python C API with setuptools.setup
. Everywhere I look on internet just tells me how to build Python C Extensions with distutils.core.setup
. No one ever uses setuptools.setup
.