On 26 July 2017 at 04:45, Aleks Bunin <b...@enlnt.com> wrote: > Hello, > > I’m writing installation instructions for a package and have a question: > what is the correct predictable URL for the package? I found couple. Which > one of these guaranteed won’t change again in the future? > > https://pypi.python.org/packages/source/v/virtualenv/virtualenv-15.1.0.tar.gz > (used to work in the past, but doesn’t seem to work now, copied from > virtualenv’s docs) > https://pypi.io/packages/source/v/virtualenv/virtualenv-15.1.0.tar.gz > https://pypi.org/packages/source/v/virtualenv/virtualenv-15.1.0.tar.gz > https://files.pythonhosted.org/packages/source/v/virtualenv/virtualenv-15.1.0.tar.gz > > Is there a predictable URL, which will return latest version of the > package?
No, and it isn't particularly straightforward to go from a downloaded tarball to a correctly installed component either. Direct downloads will also bypass any pre-published wheel files. While https://www.python.org/dev/peps/pep-0503/ defines the current API for tools to retrieve this information from the service, the most robust option is to instead let a dedicated client tool like pip handle the problem: * pip install: retrieve *and* install a component * pip download: just retrieve the files without installing them locally Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig