install-pyrun not able to download setuptools + pip due to pypi changes (install-pyrun script version 1.4.2)
Holger Joukl <[email protected]> Mon, 6 May 2019 11:48:28 +0200
| Newsgroups | gmane.comp.python.egenix.user |
|---|---|
| Message-ID | <OF0CBD0D76.0756089C-ONC12583F2.002E1B8D-C12583F2.0035E05D@LBBW.de> |
Hi, first post here, I'm experimenting a little with the very nice pyrun. Seems like several changes on PyPI (e.g. as described here: https://status.python.org/incidents/1y1f44q6srh2) make install-pyrun fail because - redirects are needed to retrieve the package JSONs with the URLs used in install-pyrun - the JSON content seems to have changed in a way that makes the regular expression-based retrieval of setuptools + pip package .tar.gz files fail. Here's a very basic patch that made things work for me: $ diff install-pyrun.ORIG install-pyrun 14c14 < -l of --log --- > -l or --log 74c74 < tools are downloaded from pypi.python.org. --- > tools are downloaded from pypi.org. 475,476c475,476 < SETUPTOOLS_JSON_URL="https://pypi.python.org/pypi/setuptools/json" < SETUPTOOLS_RE="https://pypi.python.org/packages/.+/setuptools-[0-9\.]+ \.tar\.gz" --- > SETUPTOOLS_JSON_URL="https://pypi.org/pypi/setuptools/json" > SETUPTOOLS_RE='https://files.pythonhosted.org/packages/[^":]+/setuptools-[0-9 \.]+\.tar\.gz' 497,498c497,498 < PIP_JSON_URL="https://pypi.python.org/pypi/pip/json" < PIP_RE="https://pypi.python.org/packages/.+/pip-[0-9\.]+\.tar\.gz" --- > PIP_JSON_URL="https://pypi.org/pypi/pip/json" > PIP_RE='https://files.pythonhosted.org/packages/[^":]+/pip-[0-9\.]+\.tar \.gz' egrep .+ expression matches the longest match which caused the previous regexp to not work correctly any more. The URLs and maybe some other stuff (e.g. curl options) should essentially be configurable but then again maybe it's not worth to bother because they won't change any time soon again(?). If there's a place where I should make a pull request for this patch, please let me know. Best, Holger Landesbank Baden-Wuerttemberg Anstalt des oeffentlichen Rechts Hauptsitze: Stuttgart, Karlsruhe, Mannheim, Mainz HRA 12704 Amtsgericht Stuttgart HRA 4356, HRA 104 440 Amtsgericht Mannheim HRA 40687 Amtsgericht Mainz Die LBBW verarbeitet gemaess Erfordernissen der DSGVO Ihre personenbezogenen Daten. Informationen finden Sie unter https://www.lbbw.de/datenschutz. _______________________________________________________________________ eGenix.com User Mailing List http://www.egenix.com/ https://www.egenix.com/mailman/listinfo/egenix-users