Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#36402 closed Cleanup/optimization (fixed)

Update sdist package name in reusabe apps tutorial for PEP 625

Reported by: 李明 Owned by: Jason Judkins
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by Sarah Boyce)

https://docs.djangoproject.com/zh-hans/2.0/intro/reusable-apps/ 文档链接 第8小节试着构建你自己的应用包通过 ptyhon setup.py sdist (在 django-polls目录内)。这将创建一个名为 dist 的目录并构建你自己的应用包, django-polls-0.1.tar.gz。 python关键字拼错,让我这让的初学者很懵逼,希望能采纳改进,跟着步骤做的生成的包是django_polls-0.1.tar.gz 是 '_'而不是 '-' 导致我安装 (pip install --user django-polls/dist/django-polls-0.1.tar.gz) 一直找不到文件,希望能把这些错误优化掉,在这里我祝愿 Django团队越来越好!


In the ​https://docs.djangoproject.com/en/2.0/intro/reusable-apps/#packaging-your-app document link, try to build your own application package through pip setup.py sdist (in the django-polls directory). This will create a directory called dist and build your own application package, django-polls-0.1.tar.gz. The python keyword is misspelled, which makes me, a beginner, very confused. I hope to adopt improvements. The package generated by following the steps is django_polls-0.1.tar.gz, which is '_' instead of '-', which caused me to install (pip install --user django-polls/dist/django-polls-0.1.tar.gz) and I can't find the file. I hope these errors can be optimized. Here I wish the Django team better and better!

Attachments (1)

Pasted_django_ticket_36402.png (145.3 KB ) - added by Jason Judkins 3 months ago.

Download all attachments as: .zip

Change History (14)

comment:1 by Sarah Boyce, 3 months ago

Description: modified (diff)
Summary: 文档小bugTypo in generated tarball in packaging your app tutorial
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization
Version: 5.1dev

The documentation has updated since 2.0 to use a pyproject.toml file but confirmed that the built tarball has an underscore and the typo is still present there: https://docs.djangoproject.com/en/5.2/intro/reusable-apps/#packaging-your-app

comment:2 by Sarah Boyce, 3 months ago

Easy pickings: set

comment:3 by Jason Judkins, 3 months ago

Owner: set to Jason Judkins
Status: newassigned

comment:4 by Jason Judkins, 3 months ago

Has patch: set

by Jason Judkins, 3 months ago

comment:5 by Jason Judkins, 3 months ago

The documentation incorrectly stated that running python -m build would
create a package named "django-polls-0.1.tar.gz", but the actual filename
uses an underscore: "django_polls-0.1.tar.gz". This caused confusion for
users following the tutorial.

I updated the reusable-apps.txt file in docs/intro.

comment:6 by Sarah Boyce, 3 months ago

Patch needs improvement: set

comment:7 by Jason Judkins, 3 months ago

Removed unnecessary explanation from the update.

comment:8 by Tim Graham, 3 months ago

Patch needs improvement: unset
Summary: Typo in generated tarball in packaging your app tutorialUpdate sdist package name in reusabe apps tutorial for PEP 625
Triage Stage: AcceptedReady for checkin

comment:9 by Natalia Bidart, 3 months ago

When building with recent versions of build, there are warnings about the LICENSE, so this part of the tutorial should also be fixed when resolving #35961.

comment:10 by GitHub <noreply@…>, 3 months ago

Resolution: fixed
Status: assignedclosed

In 1307b8a:

Fixed #36402, Refs #35980 -- Updated built package name in reusable apps tutorial for PEP 625.

comment:11 by Natalia <124304+nessita@…>, 3 months ago

In 81320d0a:

[5.2.x] Fixed #36402, Refs #35980 -- Updated built package name in reusable apps tutorial for PEP 625.

Backport of 1307b8a1cb05762147736d0f347792b33f645390 from main.

comment:12 by Natalia <124304+nessita@…>, 3 months ago

In 129750a8:

[5.1.x] Fixed #36402, Refs #35980 -- Updated built package name in reusable apps tutorial for PEP 625.

Backport of 1307b8a1cb05762147736d0f347792b33f645390 from main.

comment:13 by Natalia <124304+nessita@…>, 3 months ago

In c5b42632:

[4.2.x] Fixed #36402, Refs #35980 -- Updated built package name in reusable apps tutorial for PEP 625.

Backport of 1307b8a1cb05762147736d0f347792b33f645390 from main.

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