Python Package Index

"PyPI" redirects here. It is not to be confused with PyPy, a Python interpreter and JIT compiler.

The Python Package Index, abbreviated as PyPI and also known as the Cheese Shop (a reference to the Monty Python's Flying Circus sketch Cheese Shop)[1][2] is the official third-party software repository for Python.[3] It is analogous to CPAN, the repository for Perl.[4] Some package managers, including pip, use PyPI as the default source for packages and their dependencies.[5][6] Although code authors may use PyPI to host actual files, they can also choose to only place an external link that leads to the project home page on the index page.[7] Over 86,000 Python packages can be accessed through PyPI.[8]

History

The Python Distribution Utilities (distutils) Python module was first added to the Python standard library in the 1.6.1 release, in September 2000,[9] and in the 2.0 release, in October 2000.[10] with the goal of simplifying the process of installing third-party Python packages.

However, distutils only provided the tools for packaging Python code, and no more. It was able to collect and distribute metadata but did not use it for other purposes.[11] Python still lacked a centralised catalog for packages on the internet. PEP 241, a proposal to standardise metadata for indexes, was finalised in March 2001.[12] A proposal to create a comprehensive centralised catalog,[3] hosted at the python.org domain, was later finalised in November 2002.[11]

Structure

Although code authors may use PyPI to host actual files, they can also choose to only place an external link that leads to the project home page on the index page.[7] PyPI primarily hosts Python packages in the form of archives known as Python Eggs. Similarly to JAR archives in Java,[13] Eggs are fundamentally ZIP files, but with the .egg extension, that contains the Python code for the package itself, and a setup.py file that holds the package's metadata. The setup.py file also constitutes the entry point to managing the package: by executing it, the user can perform actions such as creating Eggs, RPM archives, or Windows Installers of the package's source code; building certain portions of the package; installing the package directly to the system; running unit tests; or uploading the package back to PyPI.[14][15]

PyPI as an index allows users to search for packages by keywords or by filters against their metadata, such as free software license or compatibility with POSIX.[16] A single entry on PyPI is able to store, aside from just a package and its metadata, previous releases of the package, the package's HTML documentation,[17] precompiled eggs (e.g. containing DLLs on Windows), as well as different forms for operating system or Python version incompatibilities.

Notes

References

  1. Lutz 2006, p. 8.
  2. Ramalho 2015, p. 742.
  3. 1 2 Hylton, Jeremy (24 September 2003). "Python Package Index Tutorial". Jeremy Hylton. Archived from the original on 22 April 2012. Retrieved 22 April 2012.
  4. Barry 2010, p. 36.
  5. "Usage". pip 1.1.post1 documentation. The pip developers. Archived from the original on 22 April 2012.
  6. "PyPI mirrors". Python Package Index. Python Software Foundation. Archived from the original on 22 April 2012. Retrieved 22 April 2012.
  7. 1 2 Hussain 2011, p. 28.
  8. "PyPI - the Python Package Index". Python Package Index. Python Software Foundation. Retrieved 18 August 2016.
  9. "Python 1.6.1". Python Software Foundation. Retrieved 24 April 2012.
  10. "What's New in Python 2.0". Python Software Foundation. Retrieved 2 August 2016.
  11. 1 2 "PEP 301 -- Package Index and Metadata for Distutils". Python Software Foundation. 24 October 2002. Retrieved 3 June 2012.
  12. "PEP 241 -- Metadata for Python Software Packages". Python Software Foundation. 19 October 2001. Retrieved 18 August 2016.
  13. Mertz, David (24 October 2006). "Charming Python: Hatch Python eggs with setuptools". Retrieved 7 June 2012.
  14. Gebel, Harry (22 April 2000). "[Distutils] INSTALL file". distutils-sig (Mailing list). Retrieved 2 August 2016.
  15. Each .py file contains a description = ... line that contains a short summary of what the code does: "distutils2: 65e23cccd0db". Python Software Foundation. 27 October 2012. Retrieved 2 August 2016.
  16. "Browse : Python Package Index". Python Software Foundation. Retrieved 2 August 2016.
  17. "Documentation of various Python packages". Retrieved 2 August 2016.

Bibliography

External links

This article is issued from Wikipedia - version of the 10/1/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.