Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#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 Florian Apolloner, 7 years ago

Component: UncategorizedPackaging
Type: UncategorizedCleanup/optimization

comment:2 by Claude Paroz, 7 years ago

Shouldn't the description be extracted from setup.py? Or are we talking about another description here?

comment:3 by Florian Apolloner, 7 years ago

Yes, but we do not set any long_description

comment:4 by Claude Paroz, 7 years ago

Ah yes, thanks. Looks like many projects are using their README content to fill long_description.

comment:5 by Claude Paroz, 7 years ago

Triage Stage: UnreviewedAccepted

comment:6 by Claude Paroz, 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 Florian Apolloner, 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 Tim Graham, 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 Carlton Gibson, 7 years ago

Has patch: set

comment:10 by GitHub <noreply@…>, 7 years ago

Resolution: fixed
Status: newclosed

In 2e1f674:

Fixed #29373 -- Added long_description in setup.py.

comment:11 by Tim Graham <timograham@…>, 7 years ago

In 2b0da16:

[2.0.x] Fixed #29373 -- Added long_description in setup.py.

Backport of 2e1f674897e89bbc69a389696773aebfec601916 from master

Note: See TracTickets for help on using tickets.
Back to Top