Menu

Tree [817fa2] default tip /
 History

Read Only access


File Date Author Commit
 _doc 2020-03-30 Anthon van der Neut Anthon van der Neut [b483de] work around ensurepip expecting py2.py3 wheel
 .hgtags 2020-03-30 Anthon van der Neut Anthon van der Neut [817fa2] Added tag 0.2.1 for changeset b483de629031
 LICENSE 2020-03-22 Anthon van der Neut Anthon van der Neut [179d81] update setup.py for 3.8
 README.rst 2020-03-29 Anthon van der Neut Anthon van der Neut [2da96a] added option to use pip for search/upgrade
 _README.ryd 2020-03-29 Anthon van der Neut Anthon van der Neut [2da96a] added option to use pip for search/upgrade
 __init__.py 2020-03-30 Anthon van der Neut Anthon van der Neut [b483de] work around ensurepip expecting py2.py3 wheel
 __main__.py 2018-08-07 Anthon van der Neut Anthon van der Neut [d66152] added __main__.py
 setup.py 2020-03-22 Anthon van der Neut Anthon van der Neut [179d81] update setup.py for 3.8
 upgrade_ensurepip.py 2020-03-30 Anthon van der Neut Anthon van der Neut [b483de] work around ensurepip expecting py2.py3 wheel

Read Me

upgrade_ensurepip

https://sourceforge.net/p/upgrade-ensurepip/code/ci/default/tree/_doc/_static/license.svg?format=raw https://sourceforge.net/p/upgrade-ensurepip/code/ci/default/tree/_doc/_static/pypi.svg?format=raw https://sourceforge.net/p/oitnb/code/ci/default/tree/_doc/_static/oitnb.svg?format=raw https://sourceforge.net/p/ryd/code/ci/default/tree/_doc/_static/ryd.svg?format=raw

Once you find that:

/your/installed/version/bin/python3 -m venv /some/venv

followed by:

/some/venv/bin/pip install some_package

gives a message that there is an update for pip, this package can update the wheel files used by ensurepip (pip, setuptools) to the latest versions available on pypi, and get rid of this message (at least to the next upgrade).

You can do this upgrade by running:

/your/installed/version/bin/python3 -m upgrade_ensurepip

In order to be able to use the above command, you either have to install the package using something like:

/your/installed/version/bin/pip install --disable-pip-version-check upgrade_ensurepip

or alternatively you can to make sure the file upgrade_ensurepip.py from that package is in your current directory.

Without options upgrade_ensurepip checks the JSON information on the pacakage, downloads the wheel (to memory) if there is a newer version and does a check against the sha256 is made before saving the newly downloaded wheels to disc.

If started With the option --pip, the pip "living" in the same directory as the Python executable is used to first search for the package to get the latest version number, then pip is used to download the wheel for that version. This is somewhat slower, but as pip should follow any instructions in your ~/.config/pip/pip.conf, including upgrading from local repositories.

After finding and downloading newer versions, using one of the above methods, the /your/installed/version/lib/pythonX.Y/ensurepip/__init__.py file is updated as it hard-codes the versions of the wheels used. Before changing, a backup of the original is made if such a backup does not yet exist.

As old wheels are preserved, only backup file __init__.py.org located under /your/installed/version/lib/pythonX.Y/ensurepip/ needs to be copied back in case you encounter any problems.