packaging.python.org icon indicating copy to clipboard operation
packaging.python.org copied to clipboard

New tutorials: write section to define and describe "package"

Open ddbeck opened this issue 9 years ago • 7 comments

(For more information about this issue, please see #194).

We need a short section to follow the prerequisites section (see #196) (i.e., as its own file). It should satisfy the following goals:

  • explain what a distribution package is
  • explain how a distribution package differs from import packages and modules
  • use the terminology that the wider Python Packaging User Guide uses, so the terminology is familiar if the reader turns to another part of the guide

I also think it would be helpful if the section could illustrate each point with some kind of example, either a made-up example or a real-world example, if it's not too complicated.

When opening pull requests for this issue, please submit to the develop branch. If you have questions that concern contributing more generally, please use issue #194. Otherwise, feel free to comment with questions or feedback. Thanks!

ddbeck avatar Dec 07 '15 20:12 ddbeck

Relevant background info:

The typical case for a distribution package shipping multiple import packages is shipping a single top-level import package that contains multiple subpackages. For example, django.core and django.db are separate import packages provided by the django distribution package.

More uncommonly, a single distribution package may ship multiple top level import packages. For example, the setuptools distribution package ships both the setuptools and pkg_resources import packages.

The reason the latter practice has fallen out of favour is because it hurts discoverability - installing the "django" distribution package to be able to import "django.core" is relatively obvious, but needing to install "setuptools" to be able to import "pkg_resources" is entirely unintuitive.

ncoghlan avatar Dec 08 '15 03:12 ncoghlan

@ddbeck I will work on this document. In regard to the examples, is it acceptable to write a scenario of the types of files that are contained in a distribution vs import package and why the package type was chosen, or do you want something more specific?

ghost avatar Dec 11 '15 07:12 ghost

@dsmatlak That sounds fine. I think this should be a breezy, high-level overview, so any examples should be too (an outline of files and directories might be helpful, but a long, detailed source code sample wouldn't be—the reader will get a chance to make a package themselves in a later section anyway).

ddbeck avatar Dec 11 '15 10:12 ddbeck

@ddbeck Great, thanks for the feedback.

ghost avatar Dec 16 '15 08:12 ghost

I had planned to work on #199 but other life events are taking precedence, so I do not have the bandwidth at this time.

ghost avatar Feb 11 '16 05:02 ghost

@dsmatlak I understand completely. Thanks for the heads up!

ddbeck avatar Feb 11 '16 12:02 ddbeck

I am open to work on #199 isssue.

tejaswini4996 avatar Jul 09 '23 14:07 tejaswini4996