2

After having uploaded my code to pypi using twine, the information that should be displayed in the sidebar (i.e. homepage, classifiers, keywords, author, author-email) are now displayed in the main body as plaintext (except for homepage and author-email, which are urls).

I wondered if this is an issue with my setup.py but haven't found much on google yet.

The (abridged) contents of setup.py:

setup( name="binarycpython", version="0.2", description=""" This is a python API for binary_c (versions {}) by David Hendriks, Rob Izzard and collaborators. Based on the initial set up by Jeff andrews. It is tested and designed to work for versions {}, we can't guarantee proper functioning for other versions If you want to use a different version of binary_c, download and install a different version of this package """.format( ','.join(str(REQUIRED_BINARY_C_VERSIONS)), ','.join(str(REQUIRED_BINARY_C_VERSIONS)) ), author="David Hendriks", author_email="[email protected]", # long_description=readme(), long_description="hello", url="https://gitlab.eps.surrey.ac.uk/ri0005/binary_c-python", license="gpl", keywords = ['binary_c', 'astrophysics', 'stellar evolution', 'population synthesis'], # Keywords that define your package best packages=[ "binarycpython", "binarycpython.utils", "binarycpython.core", "binarycpython.tests", "binarycpython.tests.c_bindings", ], install_requires=["numpy", "pytest", "h5py"], include_package_data=True, ext_modules=[BINARY_C_PYTHON_API_MODULE], # binary_c must be loaded classifiers=[ "Development Status :: 3 - Alpha", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3", "Programming Language :: C", "Topic :: Education", "Topic :: Scientific/Engineering :: Physics", "Topic :: Software Development :: Libraries :: Python Modules", ], cmdclass={'build': CustomBuildCommand}, ) 

The description is also formatted in an odd way: the lines after the blank line are in a different place than the rest. This, however, might be just the way it works.

Any suggestions/tips are appreciated!

0

2 Answers 2

1

Your description field should not contain newlines.

This is https://github.com/pypa/setuptools/issues/1390.

Sign up to request clarification or add additional context in comments.

1 Comment

This has indeed solved the issue of the wrong formatting, as well as another issue that I had with long_description being in markdown instead of rst.
1

You should exchange (short) description and long_description. But other than that everything in the setup.py looks right. You can verify the data yourself by looking into the generated file PKG-INFO.

My advice is to contact PyPI support.

1 Comment

So the long_description contains a placeholder for what is in readme.md (I encounter a different problem there with having a markdown rather than a .rst file), so the description contains what I intend it to have I think. Regarding the PKG-INFO: it indeed contains the correct information (i.e. all the classifiers, homepage etc)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.