1

I want to pull the live version of a package as a dependency of another package I install with pip.

Now, I have already found out how to install a live version of a package via pip; and that is not the question I am asking here.

I'd like to know whether I can pull in a live dependency version (e.g. from the PyPI index) - at present I was only able to set up tarballs via PyPI.

Community
  • 1
  • 1
TheChymera
  • 17,004
  • 14
  • 56
  • 86

1 Answers1

2

In your setup.py, do:

from setuptools import setup


setup(
    ...
    install_requires=[
        'a_required_pypi_package',
        'another_package_in_pypi>=minimum_version'
    ]
    ...
)

and pip, setup.py install or setup.py develop will take care of it.

However the requirement will be considered satisfied, if any version of a_required_pypi_package is installed. This is especially true, if you use pip freeze to write a requirements.txt and use it to install packages.

  • how would this differ from just specifying a package for which pip will then pull in the newest version? PyPI hosts tarballs for each packagem how do I tell pip to not download those but rather from the PKG-INFO `Download-url:`? – TheChymera Aug 15 '14 at 04:05
  • Now I do not understand at all.`DDownload-url` is the url to download this very package version, not "latest". See [PEP0314](http://legacy.python.org/dev/peps/pep-0314/) – Antti Haapala -- Слава Україні Aug 15 '14 at 05:29
  • Ok, so apparently I can't use Download-url then? I want to have a live package, as simple as that, which I can pull as a dependency via pip. A live package is not pulled from a tarball uploaded somewhere, but directly from the source code in development (in my case at a github url). – TheChymera Aug 15 '14 at 05:37