#29373 closed Cleanup/optimization (fixed)
Provide a description for PyPI
Reported by: | Florian Apolloner | Owned by: | nobody |
---|---|---|---|
Component: | Packaging | Version: | 2.0 |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Currently https://pypi.org/project/Django/#description looks pretty empty; a few sentences there would be nice.
Setting as release blocker so we tackle it before the next release.
Change History (11)
comment:1 by , 7 years ago
Component: | Uncategorized → Packaging |
---|---|
Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 7 years ago
comment:4 by , 7 years ago
Ah yes, thanks. Looks like many projects are using their README content to fill long_description
.
comment:5 by , 7 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:6 by , 7 years ago
Could be as easy as:
diff --git a/setup.py b/setup.py index 32dfc9d291..0a6ee89ea0 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ import os import sys from distutils.sysconfig import get_python_lib +from pathlib import Path from setuptools import find_packages, setup @@ -70,6 +71,7 @@ setup( author_email='foundation@djangoproject.com', description=('A high-level Python Web framework that encourages ' 'rapid development and clean, pragmatic design.'), + long_description=Path('README.rst').read_text(), license='BSD', packages=find_packages(exclude=EXCLUDE_FROM_PACKAGES), include_package_data=True,
comment:7 by , 7 years ago
Jupp certainly better than nothing; could you do an upload to https://test.pypi.org/ so we can see if it renders correctly (you might need another package name though, Django seems to be claimed already)
comment:8 by , 7 years ago
I don't think we can use pathlib
if we want setup.py
to remain Python 2.7 compatible as discussed in 32ade4d73b50aed77efdb9dd7371c17f89061afc (#28878). pythonhosted.org suggests:
def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() ... long_description=read('README.rst'),
comment:9 by , 7 years ago
Has patch: | set |
---|
On TestPyPI for preview here: https://test.pypi.org/project/Django-TestPyPI-Upload/
Shouldn't the description be extracted from setup.py? Or are we talking about another description here?