From d5b0b816e822f0bb60f43ccfbde220ce58c4155d Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Sun, 5 Oct 2014 11:10:40 -0700 Subject: [PATCH 01/11] Update Glossary (and links on some pages) for issue #106. --- source/distributing.rst | 12 +++--- source/glossary.rst | 89 ++++++++++++++++++++++++----------------- source/installing.rst | 2 +- 3 files changed, 59 insertions(+), 44 deletions(-) diff --git a/source/distributing.rst b/source/distributing.rst index a9dd0bb637..ea9d479343 100644 --- a/source/distributing.rst +++ b/source/distributing.rst @@ -130,7 +130,7 @@ from `sampleproject/setup.py packages=find_packages(exclude=['contrib', 'docs', 'tests*']), -It's required to list the :term:`packages ` to be included +It's required to list the :term:`packages ` to be included in your project. Although they can be listed manually, ``setuptools.find_packages`` finds them automatically. Use the ``exclude`` keyword argument to omit packages that are not intended to be released and @@ -214,8 +214,8 @@ For more on using "install_requires" see :ref:`install_requires vs Requirements Package Data ------------ -Often, additional files need to be installed into a :term:`package `. These files are often data that’s closely related to the +Often, additional files need to be installed into a :term:`package +`. These files are often data that’s closely related to the package’s implementation, or text files containing documentation that might be of interest to programmers using the package. These files are called "package data". @@ -246,7 +246,7 @@ Data Files Although configuring :ref:`Package Data` is sufficient for most needs, in some cases you may need to place data files *outside* of your :term:`packages -`. The ``data_files`` directive allows you to do that. +`. The ``data_files`` directive allows you to do that. from `sampleproject/setup.py `_ @@ -343,8 +343,8 @@ Packaging your Project ====================== To have your project installable from a :term:`Package Index` like :term:`PyPI -`, you'll need to create a :term:`Distribution` -(aka ":term:`Package `" ) for your project. +`, you'll need to create a +:term:`distribution package` (aka ":term:`package`") for your project. diff --git a/source/glossary.rst b/source/glossary.rst index 7179a7901d..43a7744969 100644 --- a/source/glossary.rst +++ b/source/glossary.rst @@ -18,7 +18,7 @@ Glossary Built Distribution - A :term:`Distribution` format containing files and metadata that only + A :term:`distribution package` format containing files and metadata that only need to be moved to the correct location on the target system, to be installed. :term:`Wheel` is such a format, whereas distutil's :term:`Source Distribution ` is not, @@ -27,13 +27,19 @@ Glossary (:term:`Wheel` intentionally does not include compiled python files). - Distribution + distribution package + + A distribution package is a versioned archive file containing Python + :term:`packages `, :term:`modules `, and + other resource files used to distribute a :term:`Release`. The + distribution package is the file an end-user can download from the + internet and install. + + It is common in Python to use the simpler term ":term:`package`" + when referring to distribution packages (e.g. the name of the Python + installation tool :ref:`pip` is an acronym for "pip installs + packages"). - A Python distribution is a versioned archive file that contains Python - :term:`packages `, :term:`modules `, and - other resource files that are used to distribute a :term:`Release`. The - distribution file is what an end-user will download from the internet - and install. Egg @@ -52,14 +58,25 @@ Glossary Python extensions on Windows, or a Java class file for Jython extensions. + import package + + An import package is a directory containing an ``__init__.py`` file (ex. + ``mypackage/__init__.py``), and also usually containing modules + (possibly along with other packages). + + It is common in Python to refer to an import package using + the simpler term ":term:`package`" (e.g. when instructing one to + import a package by typing ``import mypackage``). + Known Good Set (KGS) - A set of distributions at specified versions which are compatible with + A set of :term:`distribution packages ` + at specified versions which are compatible with each other. Typically a test suite will be run which passes all tests - before a specific set of packages is declared a known good set. This + before a specific set is declared a known good set. This term is commonly used by frameworks and toolkits which are comprised of - multiple individual distributions. + multiple individual distribution packages. Module @@ -68,40 +85,33 @@ Glossary types: :term:`Pure Module`, or :term:`Extension Module`. - Package (Meaning #1) + package - A directory containing an ``__init__.py`` file (ex. - ``mypackage/__init__.py``), and also usually containing modules - (possibly along with other packages). You can import a package: ``import - mypackage`` - - - Package (Meaning #2) + This ubiquitous Python word in fact has two meanings: + ":term:`distribution package`" for the versioned archive file that + contains a project :term:`release`, and ":term:`import package`" + for a directory of Python modules that can be imported. See the + entries for these two terms for more complete definitions. - A synonym for :term:`Distribution`. It is common in Python to refer to a - distribution using the term "package". While the two meanings of the - term "package" is not always 100% unambigous, the context of the term - "package" is usually sufficient to distinguish the meaning of the - word. For example, the python installation tool :ref:`pip` is an acronym - for "pip installs packages". while technically the tool installs - distributions. Even the site where distributions are distributed at is - called the ":term:`Python Package Index `" - (and not the "Python Distribution Index"). + The :term:`Python Packaging User Guide (PyPUG)` uses these more + complete terms instead of "package" for emphasis, or when the + meaning is not clear from context. Usually, however, context is + enough to know what meaning is intended. Package Index - A repository of distributions with a web interface to automate - :term:`Distribution` discovery and consumption. + A repository of :term:`distribution packages ` + with a web interface to automate :term:`distribution package` discovery and consumption. Project A library, framework, script, plugin, application, or collection of data or other resources, or some combination thereof that is intended to be - packaged into a :term:`Distribution`. + packaged into a :term:`distribution package`. - Since most projects create :term:`Distributions ` using + Since most projects create :term:`distribution packages ` using :ref:`distutils` or :ref:`setuptools`, another practical way to define projects currently is something that contains a :term:`setup.py` at the root of the project src directory, where "setup.py" is the project @@ -110,7 +120,7 @@ Glossary Python projects must have unique names, which are registered on :term:`PyPI `. Each project will then contain one or more :term:`Releases `, and each release may - comprise one or more :term:`distributions `. + comprise one or more :term:`distribution packages `. Note that there is a strong convention to name a project after the name of the package that is imported to run that project. However, this @@ -134,6 +144,11 @@ Glossary mailing list `_. + Python Packaging User Guide (PyPUG) + + The guide you are reading. + + Python Package Index (PyPI) `PyPI `_ is the default :term:`Package @@ -146,14 +161,14 @@ Glossary by a version identifier. Making a release may entail the publishing of multiple - :term:`Distributions `. For example, if version 1.0 of a + :term:`distribution packages `. For example, if version 1.0 of a project was released, it could be available in both a source distribution format and a Windows installer distribution format. Requirement - A specification for a :term:`package ` to be + A specification for a :term:`package ` to be installed. :ref:`pip`, the :term:`PYPA ` recommended installer, allows various forms of specification that can all be considered a "requirement". For more information, see the @@ -181,7 +196,7 @@ Glossary Source Distribution (or "sdist") - A :term:`distribution ` format (usually generated using + A :term:`distribution package` format (usually generated using ``python setup.py sdist``) that provides metadata and the essential source files needed for installing by a tool like :ref:`pip`, or for generating a :term:`Built Distribution`. @@ -208,8 +223,8 @@ Glossary Working Set - A collection of :term:`distributions ` available for + A collection of :term:`distribution packages ` available for importing. These are the distributions that are on the `sys.path` - variable. At most, one :term:`Distribution` for a project is possible in + variable. At most, one :term:`distribution package` for a project is possible in a working set. diff --git a/source/installing.rst b/source/installing.rst index ec10a52965..c90b26401d 100644 --- a/source/installing.rst +++ b/source/installing.rst @@ -9,7 +9,7 @@ Tutorial on Installing Distributions :local: This tutorial covers the basics of how to install Python :term:`packages -`, which are known more formally as +`, which are known more formally as :term:`distributions `. From ee4745975e527577f695a4529ecf70ab2bd4a682 Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Sun, 5 Oct 2014 11:16:15 -0700 Subject: [PATCH 02/11] Update remaining Glossary term links for issue #106. --- source/current.rst | 2 +- source/distributing.rst | 4 ++-- source/installing.rst | 10 +++++----- source/projects.rst | 2 +- source/technical.rst | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/source/current.rst b/source/current.rst index f3d5ccdf83..e77e5f269e 100644 --- a/source/current.rst +++ b/source/current.rst @@ -14,7 +14,7 @@ what tools are currently recommended, then here it is. Installation Tool Recommendations ================================= -* Use :ref:`pip` to install Python :term:`distributions ` from +* Use :ref:`pip` to install Python :term:`distribution packages ` from :term:`PyPI `. [1]_ [2]_ * Use :ref:`virtualenv`, or `pyvenv`_ to isolate application specific diff --git a/source/distributing.rst b/source/distributing.rst index ea9d479343..e32b87e676 100644 --- a/source/distributing.rst +++ b/source/distributing.rst @@ -35,7 +35,7 @@ We recommend the following installation sequence: 1. For building :term:`wheels `: ``pip install wheel`` [1]_ -2. For uploading :term:`distributions `: ``pip install twine`` +2. For uploading :term:`distribution packages `: ``pip install twine`` [1]_ @@ -296,7 +296,7 @@ cross-platform compatibility, is to use "console_script" `entry points `_ that register your script interfaces, and let the toolchain handle the work of turning these interfaces into actual scripts [2]_. The scripts will be -generated during the install of your :term:`distribution `. +generated during the install of your :term:`distribution package`. For more information, see `Automatic Script Creation `_ diff --git a/source/installing.rst b/source/installing.rst index c90b26401d..75a65ee3b2 100644 --- a/source/installing.rst +++ b/source/installing.rst @@ -10,7 +10,7 @@ Tutorial on Installing Distributions This tutorial covers the basics of how to install Python :term:`packages `, which are known more formally as -:term:`distributions `. +:term:`distribution packages `. .. _installing_setup: @@ -66,7 +66,7 @@ We recommend the following installation sequence: Virtual Environments ==================== -Python "Virtual Environments" allow Python :term:`distributions ` +Python "Virtual Environments" allow Python :term:`distribution packages ` to be installed in an isolated location for a particular application, rather than being installed globally. @@ -80,7 +80,7 @@ Or more generally, what if you want to install an application and leave it be? If an application works, any change in its libraries or the versions of those libraries can break the application. -Also, what if you can’t install :term:`distributions ` into the +Also, what if you can’t install :term:`distribution packages ` into the global site-packages directory? For instance, on a shared host. In all these cases, virtual environments can help you. They have their own @@ -206,7 +206,7 @@ default, pip only finds stable versions. Wheels ------ -:term:`Wheel` is a pre-built :term:`distribution ` format that +:term:`Wheel` is a pre-built `distribution package` format that provides faster installation compared to :term:`Source Distributions (sdist) `, especially when a project contains compiled extensions. @@ -238,7 +238,7 @@ comparison, see :ref:`Wheel vs Egg`. User Installs ------------- -To install :term:`distributions ` that are isolated to the current +To install :term:`distribution packages ` that are isolated to the current user, use the ``--user`` flag: :: diff --git a/source/projects.rst b/source/projects.rst index 869e4ccaf1..1944867673 100644 --- a/source/projects.rst +++ b/source/projects.rst @@ -277,7 +277,7 @@ User irc:#pypa | Dev irc:#pypa-dev A package in the Python Standard Library that has support for creating and -installing :term:`distributions `. :ref:`Setuptools` provides +installing :term:`distribution packages `. :ref:`Setuptools` provides enhancements to distutils, and is much more commonly used than just using distutils by itself. diff --git a/source/technical.rst b/source/technical.rst index 9274523e0c..1bb6a6cba8 100644 --- a/source/technical.rst +++ b/source/technical.rst @@ -122,7 +122,7 @@ pip vs easy_install =================== `easy_install` was released in 2004, as part of :ref:`setuptools`. It was -notable at the time for installing :term:`distributions ` from +notable at the time for installing :term:`distribution packages ` from :term:`PyPI ` using requirement specifiers, and automatically installing dependencies. @@ -197,7 +197,7 @@ Wheel vs Egg * :term:`Wheel` has an :ref:`official PEP `. :term:`Egg` did not. -* :term:`Wheel` is a :term:`distribution ` format, i.e a packaging +* :term:`Wheel` is a `distribution package` format, i.e a packaging format. [2]_ :term:`Egg` was both a distribution format and a runtime installation format (if left zipped), and was designed to be importable. From 420d0c0962af1ef3f7c84fbe1c890b13c13c06c2 Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Sun, 5 Oct 2014 11:35:28 -0700 Subject: [PATCH 03/11] Some tweaks to glossary. --- source/glossary.rst | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/source/glossary.rst b/source/glossary.rst index 43a7744969..9f330eed8c 100644 --- a/source/glossary.rst +++ b/source/glossary.rst @@ -18,7 +18,8 @@ Glossary Built Distribution - A :term:`distribution package` format containing files and metadata that only + A :term:`distribution-package ` format + containing files and metadata that only need to be moved to the correct location on the target system, to be installed. :term:`Wheel` is such a format, whereas distutil's :term:`Source Distribution ` is not, @@ -36,9 +37,9 @@ Glossary internet and install. It is common in Python to use the simpler term ":term:`package`" - when referring to distribution packages (e.g. the name of the Python - installation tool :ref:`pip` is an acronym for "pip installs - packages"). + when referring to distribution packages. For example, the name of + the Python installation tool :ref:`pip` is an acronym for "pip + installs packages," which refers to distribution packages). Egg @@ -93,10 +94,10 @@ Glossary for a directory of Python modules that can be imported. See the entries for these two terms for more complete definitions. - The :term:`Python Packaging User Guide (PyPUG)` uses these more - complete terms instead of "package" for emphasis, or when the - meaning is not clear from context. Usually, however, context is - enough to know what meaning is intended. + The :term:`Python Packaging User Guide (PyPUG)` sometimes uses these + more complete terms instead of "package" for emphasis, or when the + context is not enough to tell which meaning is intended. Usually, + however, context is enough. Package Index @@ -196,7 +197,8 @@ Glossary Source Distribution (or "sdist") - A :term:`distribution package` format (usually generated using + A :term:`distribution-package ` format (usually + generated using ``python setup.py sdist``) that provides metadata and the essential source files needed for installing by a tool like :ref:`pip`, or for generating a :term:`Built Distribution`. From dbb125dfe4772500a685e291f23bbc23db01f261 Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Sun, 5 Oct 2014 11:50:29 -0700 Subject: [PATCH 04/11] Fix a couple typos. --- source/glossary.rst | 2 +- source/installing.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/glossary.rst b/source/glossary.rst index 9f330eed8c..8cb0dbb40d 100644 --- a/source/glossary.rst +++ b/source/glossary.rst @@ -39,7 +39,7 @@ Glossary It is common in Python to use the simpler term ":term:`package`" when referring to distribution packages. For example, the name of the Python installation tool :ref:`pip` is an acronym for "pip - installs packages," which refers to distribution packages). + installs packages," which refers to distribution packages. Egg diff --git a/source/installing.rst b/source/installing.rst index 75a65ee3b2..f8d71be504 100644 --- a/source/installing.rst +++ b/source/installing.rst @@ -206,7 +206,7 @@ default, pip only finds stable versions. Wheels ------ -:term:`Wheel` is a pre-built `distribution package` format that +:term:`Wheel` is a pre-built :term:`distribution-package ` format that provides faster installation compared to :term:`Source Distributions (sdist) `, especially when a project contains compiled extensions. From 6d81ff9e9b89928bbfd0ec503d5d4da7b0030b8d Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Sun, 5 Oct 2014 13:28:25 -0700 Subject: [PATCH 05/11] Mention that package has a second meaning in each of the two definitions. --- source/glossary.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/source/glossary.rst b/source/glossary.rst index 8cb0dbb40d..0ac0ee53d0 100644 --- a/source/glossary.rst +++ b/source/glossary.rst @@ -36,10 +36,11 @@ Glossary distribution package is the file an end-user can download from the internet and install. - It is common in Python to use the simpler term ":term:`package`" - when referring to distribution packages. For example, the name of - the Python installation tool :ref:`pip` is an acronym for "pip - installs packages," which refers to distribution packages. + Despite ":term:`package`" having a :term:`second meaning + `, it is common in Python simply to say "package" + to refer to distribution packages. For example, the name of the + Python installation tool :ref:`pip` is an acronym for "pip installs + packages," which refers to distribution packages. Egg @@ -65,8 +66,9 @@ Glossary ``mypackage/__init__.py``), and also usually containing modules (possibly along with other packages). - It is common in Python to refer to an import package using - the simpler term ":term:`package`" (e.g. when instructing one to + Despite ":term:`package`" having a :term:`second meaning + `, it is common in Python simply to say + "package" to refer to import packages (e.g. instructing one to import a package by typing ``import mypackage``). From 865a582569b8a937cd3f0763745b90f69ddaf547 Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Sun, 5 Oct 2014 15:24:41 -0700 Subject: [PATCH 06/11] Updated to address Marcus Smith's comments on the PR. --- source/glossary.rst | 32 ++++++++++++++++---------------- source/installing.rst | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/source/glossary.rst b/source/glossary.rst index 0ac0ee53d0..334e320982 100644 --- a/source/glossary.rst +++ b/source/glossary.rst @@ -18,8 +18,7 @@ Glossary Built Distribution - A :term:`distribution-package ` format - containing files and metadata that only + A :term:`package ` format containing files and metadata that only need to be moved to the correct location on the target system, to be installed. :term:`Wheel` is such a format, whereas distutil's :term:`Source Distribution ` is not, @@ -28,7 +27,7 @@ Glossary (:term:`Wheel` intentionally does not include compiled python files). - distribution package + Distribution Package A distribution package is a versioned archive file containing Python :term:`packages `, :term:`modules `, and @@ -36,11 +35,12 @@ Glossary distribution package is the file an end-user can download from the internet and install. - Despite ":term:`package`" having a :term:`second meaning - `, it is common in Python simply to say "package" - to refer to distribution packages. For example, the name of the - Python installation tool :ref:`pip` is an acronym for "pip installs - packages," which refers to distribution packages. + A distribution package is normally called simply a "package." + The simpler term ":term:`package`" has a :term:`second meaning + `, but context usually makes clear which meaning + should be used. For example, the name of the Python installation tool + :ref:`pip` is an acronym for "pip installs packages," which refers + to distribution packages. Egg @@ -60,16 +60,17 @@ Glossary Python extensions on Windows, or a Java class file for Jython extensions. - import package + Import Package An import package is a directory containing an ``__init__.py`` file (ex. ``mypackage/__init__.py``), and also usually containing modules (possibly along with other packages). - Despite ":term:`package`" having a :term:`second meaning - `, it is common in Python simply to say - "package" to refer to import packages (e.g. instructing one to - import a package by typing ``import mypackage``). + An import package is normally called simply a "package." The + simpler term ":term:`package`" has a :term:`second meaning + `, but context usually makes clear which + meaning should be used (e.g. instructing one to import a package + by typing ``import mypackage``). Known Good Set (KGS) @@ -88,7 +89,7 @@ Glossary types: :term:`Pure Module`, or :term:`Extension Module`. - package + Package This ubiquitous Python word in fact has two meanings: ":term:`distribution package`" for the versioned archive file that @@ -199,8 +200,7 @@ Glossary Source Distribution (or "sdist") - A :term:`distribution-package ` format (usually - generated using + A :term:`package ` format (usually generated using ``python setup.py sdist``) that provides metadata and the essential source files needed for installing by a tool like :ref:`pip`, or for generating a :term:`Built Distribution`. diff --git a/source/installing.rst b/source/installing.rst index f8d71be504..9baa07b5e5 100644 --- a/source/installing.rst +++ b/source/installing.rst @@ -206,7 +206,7 @@ default, pip only finds stable versions. Wheels ------ -:term:`Wheel` is a pre-built :term:`distribution-package ` format that +:term:`Wheel` is a pre-built :term:`package ` format that provides faster installation compared to :term:`Source Distributions (sdist) `, especially when a project contains compiled extensions. From af422e24d857a6497d655d44f8004da34ca2784d Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Sun, 5 Oct 2014 15:37:52 -0700 Subject: [PATCH 07/11] Replace some uses of the word "distribution." The following pages were done: * README.rst * source/appveyor.rst * source/current.rst * source/deployment.rst --- README.rst | 2 +- source/appveyor.rst | 9 ++++++--- source/current.rst | 11 ++++++----- source/deployment.rst | 7 ++++--- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/README.rst b/README.rst index 7bac28f8f9..cd68ac29b7 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ Python Packaging User Guide =========================== The "Python Packaging User Guide" (PyPUG) aims to be the authoritative resource on -how to package and install distributions in Python using current tools, but also +how to create and install packages in Python using current tools, but also on the efforts to improve python packaging. The guide is part of a larger effort to improve all of the packaging and installation docs, including pip, setuptools, virtualenv, wheel, distlib, and docs.python.org. diff --git a/source/appveyor.rst b/source/appveyor.rst index 04b3651d7a..77a267c872 100644 --- a/source/appveyor.rst +++ b/source/appveyor.rst @@ -17,7 +17,8 @@ Background Windows users typically do not have access to a C compiler, and therefore are reliant on projects that use C extensions distributing binary wheels on PyPI in -order for the distribution to be installable via ``pip install dist```. +order for the :term:`package ` to be installable via +``pip install dist```. However, it is often the case that projects which are intended to be cross-platform are developed on Unix, and so the project developers *also* have the problem of lack of access to a Windows compiler. @@ -105,7 +106,8 @@ appropriate compiler for the selected Python version. `appveyor/install.ps1 `__ is a Powershell script that downloads and installs any missing Python versions, installs ``pip`` into the Python ``site-packages`` and downloads and installs the latest -``wheel`` distribution. Steps that are not needed are omitted, so in practice, +``wheel`` :term:`package `. Steps that are not needed +are omitted, so in practice, the Python install will never be run (it is present for advanced users who want to install additional versions of Python not supplied by Appveyor) and the ``pip`` install will be omitted for Python 3.4, where pip is installed as @@ -144,7 +146,8 @@ may wish to do this). External dependencies --------------------- -The supplied scripts will successfully build any distribution that does not +The supplied scripts will successfully build any :term:`package ` +that does not rely on 3rd party external libraries for the build. It would be possible for an individual project to add code to the ``install.ps1`` script to make external libraries available to the build, but this is of necessity specific to diff --git a/source/current.rst b/source/current.rst index e77e5f269e..13c39a73d2 100644 --- a/source/current.rst +++ b/source/current.rst @@ -14,7 +14,7 @@ what tools are currently recommended, then here it is. Installation Tool Recommendations ================================= -* Use :ref:`pip` to install Python :term:`distribution packages ` from +* Use :ref:`pip` to install Python :term:`packages ` from :term:`PyPI `. [1]_ [2]_ * Use :ref:`virtualenv`, or `pyvenv`_ to isolate application specific @@ -22,7 +22,7 @@ Installation Tool Recommendations * Use `pip wheel `_ to create a - cache of :term:`wheel` distributions, for the purpose of speeding up + cache of :term:`wheel` packages, for the purpose of speeding up subsequent installations. [4]_ * If you're looking for management of fully integrated cross-platform software @@ -42,8 +42,8 @@ Packaging Tool Recommendations :ref:`wheel project ` to create :term:`wheels `. This is especially beneficial, if your project contains binary extensions. [7]_ -* Use `twine `_ for uploading distributions - to :term:`PyPI `. +* Use `twine `_ for uploading + :term:`packages ` to :term:`PyPI `. ---- @@ -69,7 +69,8 @@ Packaging Tool Recommendations .. [5] Although you can use pure ``distutils`` for many projects, it does not support defining dependencies on other projects and is missing several - convenience utilities for automatically populating distribution metadata + convenience utilities for automatically populating + :term:`package ` metadata correctly that are provided by ``setuptools``. Being outside the standard library, ``setuptools`` also offers a more consistent feature set across different versions of Python, and (unlike ``distutils``), diff --git a/source/deployment.rst b/source/deployment.rst index eb18a51a00..db6287ee13 100644 --- a/source/deployment.rst +++ b/source/deployment.rst @@ -23,10 +23,11 @@ Supporting multiple hardware platforms Meaning: x86, x64, ARM, others? - For Python-only distributions, it *should* be straightforward to deploy on all - platforms where Python can run. + For Python-only :term:`distribution packages `, it + *should* be straightforward to deploy on all platforms where Python can run. - For distributions with binary extensions, deployment is major headache. Not only + For :term:`packages ` with binary extensions, + deployment is a major headache. Not only must the extensions be built on all the combinations of operating system and hardware platform, but they must also be tested, preferably on continuous integration platforms. The issues are similar to the "multiple python From b685d6e9305ebc1294d75e60eef6a9c9ff5005c6 Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Sun, 5 Oct 2014 18:00:04 -0700 Subject: [PATCH 08/11] Fix typo. --- source/technical.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/technical.rst b/source/technical.rst index 1bb6a6cba8..6478972265 100644 --- a/source/technical.rst +++ b/source/technical.rst @@ -197,8 +197,8 @@ Wheel vs Egg * :term:`Wheel` has an :ref:`official PEP `. :term:`Egg` did not. -* :term:`Wheel` is a `distribution package` format, i.e a packaging - format. [2]_ :term:`Egg` was both a distribution format and a runtime +* :term:`Wheel` is a :term:`package ` format. [2]_ + :term:`Egg` was both a package format and a runtime installation format (if left zipped), and was designed to be importable. * :term:`Wheel` archives do not include .pyc files. Therefore, when the From 0e786e2febfc09293f7db62a616a34623c391757 Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Sun, 5 Oct 2014 18:02:06 -0700 Subject: [PATCH 09/11] Fix another typo. --- source/appveyor.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/appveyor.rst b/source/appveyor.rst index 77a267c872..65bfb50d35 100644 --- a/source/appveyor.rst +++ b/source/appveyor.rst @@ -18,7 +18,7 @@ Background Windows users typically do not have access to a C compiler, and therefore are reliant on projects that use C extensions distributing binary wheels on PyPI in order for the :term:`package ` to be installable via -``pip install dist```. +``pip install dist``. However, it is often the case that projects which are intended to be cross-platform are developed on Unix, and so the project developers *also* have the problem of lack of access to a Windows compiler. From 029f310760e700c55160f5f87e0514ba2a58fd61 Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Sun, 5 Oct 2014 18:17:28 -0700 Subject: [PATCH 10/11] Replace "distribution" in development.rst. --- source/development.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/source/development.rst b/source/development.rst index a3f1188e8c..5475a3f251 100644 --- a/source/development.rst +++ b/source/development.rst @@ -37,7 +37,7 @@ Supporting multiple Python versions - the Python 3 porting how to in the main docs - cross reference to the stable ABI discussion in the binary extensions topic (once that exists) - - mention version classifiers for distribution metadata + - mention version classifiers for :term:`package ` metadata In addition to the work required to create a Python package, it is often necessary that the package must be made available on different versions of @@ -222,7 +222,7 @@ There are a few techniques to store the version in your project code without dup .. warning:: With this approach you must make sure that the ``VERSION`` file is included in - all your source and binary distributions. + all your source and binary :term:`packages `. #. Set the value in ``setup.py``, and have the project code use the ``pkg_resources`` API. @@ -260,7 +260,7 @@ There are a few techniques to store the version in your project code without dup PyPI mirrors and caches ======================= -Mirroring or caching of PyPI can be used to speed up local distribution +Mirroring or caching of PyPI can be used to speed up local :term:`package ` installation, allow offline work, handle corporate firewalls or just plain Internet flakiness. @@ -269,14 +269,14 @@ Three options are available in this area: 1. pip provides local caching options, 2. devpi provides higher-level caching option, potentially shared amongst many users or machines, and -3. bandersnatch provides a local complete mirror of all PyPI distributions. +3. bandersnatch provides a local complete mirror of all PyPI :term:`packages `. Caching with pip ---------------- pip provides a number of facilities for speeding up installation by using -local cached copies of distributions: +local cached copies of :term:`packages `: 1. `Fast & local installs `_ by @@ -303,14 +303,14 @@ __ http://doc.devpi.net/latest/quickstart-pypimirror.html Complete mirror with bandersnatch ---------------------------------- -bandersnatch will set up a complete local mirror of all PyPI distributions -(externally-hosted distributions are not mirrored). See the +bandersnatch will set up a complete local mirror of all PyPI :term:`packages ` +(externally-hosted packages are not mirrored). See the `bandersnatch documentation for getting that going`__. __ https://bitbucket.org/pypa/bandersnatch/overview -A benefit of devpi is that it will create a mirror which includes distributions -that are external to PyPI, unlike bandersnatch which will only cache distributions +A benefit of devpi is that it will create a mirror which includes packages +that are external to PyPI, unlike bandersnatch which will only cache packages hosted on PyPI. From b4502caaf3dcaa384fa2830986663a883e1393f5 Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Sun, 5 Oct 2014 18:45:03 -0700 Subject: [PATCH 11/11] Replace "distribution" in distributing.rst. --- source/distributing.rst | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/source/distributing.rst b/source/distributing.rst index 49028b3e59..423bdc4ef3 100644 --- a/source/distributing.rst +++ b/source/distributing.rst @@ -35,7 +35,7 @@ We recommend the following installation sequence: 1. For building :term:`wheels `: ``pip install wheel`` [1]_ -2. For uploading :term:`distribution packages `: ``pip install twine`` +2. For uploading :term:`packages `: ``pip install twine`` [1]_ @@ -70,8 +70,8 @@ Additionally, most projects will contain the following files: that contains option defaults for ``setup.py`` commands. * A `MANIFEST.in `_ that defines - additional files to be included in the project distribution when it's - packaged. + additional files to be included in :term:`distribution packages `` + created from the project. Name @@ -258,9 +258,11 @@ from `sampleproject/setup.py Each (directory, files) pair in the sequence specifies the installation directory and the files to install there. If directory is a relative path, it is interpreted relative to the installation prefix (Python’s sys.prefix for -pure-Python distributions, sys.exec_prefix for distributions that contain +pure-Python :term:`distribution packages `, +sys.exec_prefix for distribution packages that contain extension modules). Each file name in files is interpreted relative to the -``setup.py`` script at the top of the project source distribution. +``setup.py`` script at the top of the project :term:`source distribution +`. For more information see the distutils section on `Installing Additional Files `_. @@ -270,7 +272,7 @@ For more information see the distutils section on `Installing Additional Files :ref:`setuptools` allows absolute "data_files" paths, and pip honors them as absolute, when installing from :term:`sdist `. This is not true when installing from :term:`wheel` - distributions. Wheels don't support absolute paths, and they end up being + packages. Wheels don't support absolute paths, and they end up being installed relative to "site-packages". For discussion see `wheel Issue #92 `_. @@ -297,7 +299,7 @@ cross-platform compatibility is to use "console_script" `entry points that register your script interfaces. You can then let the toolchain handle the work of turning these interfaces into actual scripts [2]_. The scripts will be generated during the install of your -:term:`distribution package`. +:term:`package `. For more information, see `Automatic Script Creation `_ @@ -345,7 +347,7 @@ Packaging your Project To have your project installable from a :term:`Package Index` like :term:`PyPI `, you'll need to create a -:term:`distribution package` (aka ":term:`package`") for your project. +:term:`distribution package` from your project. @@ -361,7 +363,8 @@ Minimally, you should create a :term:`Source Distribution ` +is installed by pip. Even if the package is pure python (i.e. contains no extensions), it still involves a build step to build out the installation metadata from ``setup.py``. @@ -465,8 +468,8 @@ write a ``~/.pypirc`` file like so. You can leave out the password line if below you use twine with its ``-p PASSWORD`` argument. -Finally, you can upload your distributions to :term:`PyPI `. There are two options. +Finally, you can upload your :term:`packages ` to +:term:`PyPI `. There are two options. 1. **(Recommended):** Use :ref:`twine` @@ -479,7 +482,7 @@ Finally, you can upload your distributions to :term:`PyPI