From 233bb5138e75acf180c19d20167e7c355ca1d47f Mon Sep 17 00:00:00 2001 From: Laurie O Date: Wed, 8 Nov 2023 15:32:18 +1000 Subject: [PATCH 1/7] Add more package index projects --- source/guides/hosting-your-own-index.rst | 71 +++++++++++ source/guides/index-mirrors-and-caches.rst | 118 +++++++++++++----- source/key_projects.rst | 135 ++++++++++++++++++++- 3 files changed, 291 insertions(+), 33 deletions(-) diff --git a/source/guides/hosting-your-own-index.rst b/source/guides/hosting-your-own-index.rst index 26ffe2b8c3..f469c2a2e0 100644 --- a/source/guides/hosting-your-own-index.rst +++ b/source/guides/hosting-your-own-index.rst @@ -52,10 +52,81 @@ directory with autoindex enabled. For an example using the built in Web server in `Twisted`_, you would simply run ``twistd -n web --path .`` and then instruct users to add the URL to their installer's configuration. + +Existing projects +================= + +.. list-table:: + :header-rows: 1 + + * - Project + - Package upload + - PyPI fall-through [2]_ + - Additional notes + + * - :ref:`devpi` + - ✔ + - ✔ + - multiple indexes with inheritance, with syncing, replication, fail-over; + mirroring + + * - :ref:`simpleindex` + - + - ✔ + - + + * - :ref:`pypiserver` + - ✔ + - + - + + * - :ref:`pypiprivate` + - + - + - + + * - :ref:`pypicloud` + - + - + - unmaintained; also cached proxying; authentication, authorisation + + * - :ref:`pywharf` + - + - + - unmaintained; serve files in GitHub + + * - :ref:`pulppython` + - ✔ + - + - also mirroring, proxying; plugin for Pulp + + * - :ref:`pip2pi` + - + - + - also mirroring; manual synchronisation + + * - :ref:`httpserver` + - + - + - standard-library + + * - `Apache `_ + - + - ✔ + - using + `mod_rewrite + `_ + and + `mod_cache_disk + `_, + you can cache requests to package indexes through an Apache server + ---- .. [1] For complete documentation of the simple repository protocol, see :ref:`simple repository API `. +.. [2] Can be configured to fall-back to PyPI (or another package index) + if a requested package is missing. .. _Twisted: https://twistedmatrix.com/ diff --git a/source/guides/index-mirrors-and-caches.rst b/source/guides/index-mirrors-and-caches.rst index 9fdea0a1d5..f3b7bd2439 100644 --- a/source/guides/index-mirrors-and-caches.rst +++ b/source/guides/index-mirrors-and-caches.rst @@ -5,19 +5,24 @@ Package index mirrors and caches ================================ :Page Status: Incomplete -:Last Reviewed: 2014-12-24 +:Last Reviewed: 2023-11-08 - -Mirroring or caching of PyPI can be used to speed up local package installation, +Mirroring or caching of PyPI (and other +:term:`package indexes `) can be used to speed up local +package installation, allow offline work, handle corporate firewalls or just plain Internet flakiness. -Three options are available in this area: +There are multiple classes of options in this area: + +1. local/hosted caching of package indexes. + +2. local/hosted mirroring of a package index. A mirror is a (whole or + partial) copy of a package index, which can be used in place of the + original index. -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 :term:`packages - `. +3. private package index with fall-through to public package indexes (for + example, to mitigate dependency confusion attacks), also known as a + proxy. Caching with pip @@ -38,26 +43,75 @@ cached copies of :term:`packages `: python3 -m pip install --no-index --find-links=/tmp/wheelhouse SomeProject -Caching with devpi ------------------- - -devpi is a caching proxy server which you run on your laptop, or some other -machine you know will always be available to you. See the `devpi -documentation for getting started`__. - -__ https://devpi.net/docs/devpi/devpi/latest/+d/quickstart-pypimirror.html - - -Complete mirror with bandersnatch ----------------------------------- - -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://github.com/pypa/bandersnatch/ - -A benefit of devpi is that it will create a mirror which includes -:term:`packages ` that are external to PyPI, unlike -bandersnatch which will only cache :term:`packages ` -hosted on PyPI. +Existing projects +----------------- + +.. list-table:: + :header-rows: 1 + + * - Project + - Cache + - Mirror + - Proxy + - Additional notes + + * - :ref:`devpi` + - ✔ + - ✔ + - + - multiple indexes with inheritance; syncing, replication, fail-over; + package upload + + * - :ref:`bandersnatch` + - ✔ + - ✔ + - + - + + * - :ref:`simpleindex` + - + - + - ✔ + - custom plugin enables caching; re-routing to other package indexes + + * - :ref:`pypicloud` + - ✔ + - + - ✔ + - unmaintained; authentication, authorisation + + * - :ref:`pulppython` + - + - ✔ + - ✔ + - plugin for Pulp; multiple proxied indexes; package upload + + * - :ref:`proxpi` + - ✔ + - + - ✔ + - multiple proxied indexes + + * - :ref:`nginx_pypi_cache` + - ✔ + - + - ✔ + - multiple proxied indexes + + * - :ref:`flaskpypiproxy` + - ✔ + - + - ✔ + - unmaintained + + * - `Apache `_ + - ✔ + - + - ✔ + - using + `mod_rewrite + `_ + and + `mod_cache_disk + `_, + you can cache requests to package indexes through an Apache server diff --git a/source/key_projects.rst b/source/key_projects.rst index ea5730683b..b386a8f2d3 100644 --- a/source/key_projects.rst +++ b/source/key_projects.rst @@ -18,6 +18,7 @@ PyPA Projects bandersnatch ============ +`Docs `__ | `Issues `__ | `GitHub `__ | `PyPI `__ @@ -27,6 +28,7 @@ create a complete mirror of the contents of PyPI. Organizations thus save bandwidth and latency on package downloads (especially in the context of automated tests) and to prevent heavily loading PyPI's Content Delivery Network (CDN). +Files can be served from a local directory or `AWS S3`_. .. _build: @@ -442,6 +444,9 @@ devpi features a powerful PyPI-compatible server and PyPI proxy cache with a complementary command line tool to drive packaging, testing and release activities with Python. devpi also provides a browsable and searchable web interface. +devpi supports mirroring PyPI, multiple +:term:`package indexes ` with inheritance, syncing between +these indexes, index replication and fail-over, and package upload. .. _enscons: @@ -464,6 +469,20 @@ enscons. .. _SCons: https://scons.org/ +.. _flaskpypiproxy: + +Flask-Pypi-Proxy +================ + +`Docs `__ | +:gh:`GitHub ` | +`PyPI `__ + +.. warning:: Not maintained, project archived + +Flask-Pypi-Proxy is a :term:`package index ` as a cached +proxy for PyPI. + .. _hashdist: Hashdist @@ -519,6 +538,16 @@ multibuild Multibuild is a set of CI scripts for building and testing Python :term:`wheels ` for Linux, macOS, and (less flexibly) Windows. Also see :ref:`cibuildwheel`. +.. _nginx_pypi_cache: + +nginx_pypi_cache +================ + +:gh:`GitHub ` + +nginx_pypi_cache is a :term:`package index ` caching proxy +using `nginx `_. + .. _pdm: pdm @@ -564,6 +593,17 @@ requirements from information in other parts of their program, update all dependencies (a feature :ref:`pip` currently does not provide), and create layers of constraints for the program to obey. +.. _pip2pi: + +pip2pi +========= + +:gh:`GitHub ` | +`PyPI `__ + +pip2pi is a :term:`package index ` server where specific +packages are manually synchronised. + .. _piwheels: piwheels @@ -595,6 +635,58 @@ functionality within :ref:`pip`, provides its own dependency resolver. It attempts to speed users' experience of installation and dependency resolution by locally caching metadata about dependencies. +.. _proxpi: + +proxpi +====== + +:gh:`GitHub ` | +`PyPI `__ + +proxpi is a simple :term:`package index ` which proxies PyPI +and other indexes with caching. + +.. _pulppython: + +Pulp-python +=========== + +`Docs `__ | +:gh:`GitHub ` | +`PyPI `__ + +Pulp-python is the Python :term:`package index ` plugin for +`Pulp `_. Pulp-python supports mirrors backed by +local or `AWS S3`_, package upload, and proxying to multiple package +indexes. + +.. _pypicloud: + +PyPI Cloud +========== + +`Docs `__ | +:gh:`GitHub ` | +`PyPI `__ + +.. warning:: Not maintained, project archived + +PyPI Cloud is a :term:`package index ` server, backed by +`AWS S3`_ or another cloud storage service, or local files. PyPI Cloud +supports redirect/cached proxying for PyPI, as well as authentication and +authorisation. + +.. _pypiprivate: + +pypiprivate +=========== + +:gh:`GitHub ` | +`PyPI `__ + +pypiprivate serves a local (or `AWS S3`_-hosted) directory of packages as a +:term:`package index `. + .. _pypiserver: pypiserver @@ -604,7 +696,8 @@ pypiserver `PyPI `__ pypiserver is a minimalist application that serves as a private Python -package index within organizations, implementing a simple API and +:term:`package index ` (from a local directory) within +organizations, implementing a simple API and browser interface. You can upload private packages using standard upload tools, and users can download and install them with :ref:`pip`, without publishing them publicly. Organizations who use pypiserver @@ -627,6 +720,18 @@ environment so developers can start coding right away. PyScaffold can also be used with existing projects to make packaging easier. +.. _pywharf: + +pywharf +======= + +:gh:`GitHub ` | +`PyPI `__ + +.. warning:: Not maintained, project archived + +pywharf is a :term:`package index ` server, serving files +locally or from `GitHub `_. .. _scikit-build: @@ -675,6 +780,19 @@ Python zipapps as outlined in :pep:`441`, but with all their dependencies included. Its primary goal is making distributing Python applications and command line tools fast & easy. +.. _simpleindex: + +simpleindex +=========== + +:gh:`GitHub ` | +`PyPI `__ + +simpleindex is a :term:`package index ` which routes URLs to +multiple package indexes (including PyPI), serves local (or cloud-hosted, +for example `AWS S3`_, with a custom plugin) directory of packages, and +supports custom plugins. + .. _spack: Spack @@ -727,6 +845,20 @@ A package in the Python Standard Library that provides support for bootstrapping cases, end users won't use this module, but rather it will be used during the build of the Python distribution. +.. _httpserver: + +http.server +=========== + +`Docs `__ | +`Issues `__ + +A package and command-line interface which can host a directory as a +website, for example as a :term:`package index ` (see +:ref:`Hosting your Own Simple Repository`). +A package in the Python Standard Library (starting with Python 3.3) for +creating :term:`Virtual Environments `. For more +information, see the section on :ref:`Creating and using Virtual Environments`. .. _venv: @@ -746,3 +878,4 @@ information, see the section on :ref:`Creating and using Virtual Environments`. .. _distribute: https://pypi.org/project/distribute .. _Sphinx: https://www.sphinx-doc.org/en/master/ .. _pytest: https://docs.pytest.org/en/stable/ +.. _`AWS S3`: https://aws.amazon.com/s3/ From eaf379c830380c9f8ff4b01e8b8a747b08dbf18a Mon Sep 17 00:00:00 2001 From: Laurie O Date: Thu, 9 Nov 2023 10:49:26 +1000 Subject: [PATCH 2/7] Better http.server links Docs link uses intersphinx, issues link uses GitHub role Co-authored-by: chrysle --- source/key_projects.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/key_projects.rst b/source/key_projects.rst index b386a8f2d3..7a56f0b8ba 100644 --- a/source/key_projects.rst +++ b/source/key_projects.rst @@ -850,8 +850,8 @@ build of the Python distribution. http.server =========== -`Docs `__ | -`Issues `__ +`Docs `__ | +:gh:`Issues ` A package and command-line interface which can host a directory as a website, for example as a :term:`package index ` (see From 4c0a016ed268de9e0036e38186bc9faea64343fb Mon Sep 17 00:00:00 2001 From: Laurie O Date: Thu, 9 Nov 2023 10:50:18 +1000 Subject: [PATCH 3/7] Document simpleindex use of multiple directories Co-authored-by: chrysle --- source/key_projects.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/key_projects.rst b/source/key_projects.rst index 7a56f0b8ba..414ebc28f0 100644 --- a/source/key_projects.rst +++ b/source/key_projects.rst @@ -790,7 +790,7 @@ simpleindex simpleindex is a :term:`package index ` which routes URLs to multiple package indexes (including PyPI), serves local (or cloud-hosted, -for example `AWS S3`_, with a custom plugin) directory of packages, and +for example `AWS S3`_, with a custom plugin) directories of packages, and supports custom plugins. .. _spack: From 646f612a84434964dd411b6be5650360a8f267c3 Mon Sep 17 00:00:00 2001 From: Laurie O Date: Thu, 9 Nov 2023 18:14:07 +1000 Subject: [PATCH 4/7] Fix Python std-lib doc link --- source/key_projects.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/key_projects.rst b/source/key_projects.rst index 414ebc28f0..f9f7dcbea4 100644 --- a/source/key_projects.rst +++ b/source/key_projects.rst @@ -850,7 +850,7 @@ build of the Python distribution. http.server =========== -`Docs `__ | +:doc:`Docs ` | :gh:`Issues ` A package and command-line interface which can host a directory as a From 2241c5039af75a4199b2645c8dc9f61d1d0b9017 Mon Sep 17 00:00:00 2001 From: Laurie O Date: Mon, 29 Jan 2024 11:36:54 +1000 Subject: [PATCH 5/7] Add 'dumb-pypi' --- source/guides/hosting-your-own-index.rst | 5 +++++ source/key_projects.rst | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/source/guides/hosting-your-own-index.rst b/source/guides/hosting-your-own-index.rst index 94ffb5d718..9b3c200699 100644 --- a/source/guides/hosting-your-own-index.rst +++ b/source/guides/hosting-your-own-index.rst @@ -105,6 +105,11 @@ Existing projects - - also mirroring; manual synchronisation + * - :ref:`dumb-pypi` + - + - + - not a server, but a static file site generator + * - :ref:`httpserver` - - diff --git a/source/key_projects.rst b/source/key_projects.rst index ccd6ee883d..853d4e0658 100644 --- a/source/key_projects.rst +++ b/source/key_projects.rst @@ -442,6 +442,18 @@ devpi supports mirroring PyPI, multiple :term:`package indexes ` with inheritance, syncing between these indexes, index replication and fail-over, and package upload. +.. _dumb-pypi: + +dumb-pypi +========= + +`GitHub `__ | +`PyPI `__ + +dumb-pypi is a simple :term:`package index ` static file site +generator, which then must be hosted by a static file webserver to become the +package index. It supports serving the hash, core-metadata, and yank-status. + .. _enscons: enscons From b3e7b65f3f6bbc291a24b73e726684e50e300cc7 Mon Sep 17 00:00:00 2001 From: Laurie O Date: Wed, 31 Jan 2024 15:39:12 +1000 Subject: [PATCH 6/7] Remove duplicated-from-venv https.server description --- source/key_projects.rst | 3 --- 1 file changed, 3 deletions(-) diff --git a/source/key_projects.rst b/source/key_projects.rst index 853d4e0658..531c28066a 100644 --- a/source/key_projects.rst +++ b/source/key_projects.rst @@ -865,9 +865,6 @@ http.server A package and command-line interface which can host a directory as a website, for example as a :term:`package index ` (see :ref:`Hosting your Own Simple Repository`). -A package in the Python Standard Library (starting with Python 3.3) for -creating :term:`Virtual Environments `. For more -information, see the section on :ref:`Creating and using Virtual Environments`. .. _venv: From 35c7f84c6ff6b2b530c9a781ab296786465b6e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sviatoslav=20Sydorenko=20=28=D0=A1=D0=B2=D1=8F=D1=82=D0=BE?= =?UTF-8?q?=D1=81=D0=BB=D0=B0=D0=B2=20=D0=A1=D0=B8=D0=B4=D0=BE=D1=80=D0=B5?= =?UTF-8?q?=D0=BD=D0=BA=D0=BE=29?= Date: Thu, 1 Feb 2024 03:09:57 +0100 Subject: [PATCH 7/7] Spell "fall back" as a verb with a whitespace --- source/guides/hosting-your-own-index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/guides/hosting-your-own-index.rst b/source/guides/hosting-your-own-index.rst index 9b3c200699..ebcd228ee3 100644 --- a/source/guides/hosting-your-own-index.rst +++ b/source/guides/hosting-your-own-index.rst @@ -131,7 +131,7 @@ Existing projects .. [1] For complete documentation of the simple repository protocol, see :ref:`simple repository API `. -.. [2] Can be configured to fall-back to PyPI (or another package index) +.. [2] Can be configured to fall back to PyPI (or another package index) if a requested package is missing. .. _Twisted: https://twistedmatrix.com/