From cffb3c03c3d67775d5bce53ae47ba4ac8a200c50 Mon Sep 17 00:00:00 2001 From: Saurabh Yadav Date: Wed, 15 May 2019 19:16:49 +0530 Subject: [PATCH 1/2] Update dependencies.rst PEP 508 compatible specification for Packages Not On PyPI --- dependencies.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dependencies.rst b/dependencies.rst index 3ae7596..6dca830 100644 --- a/dependencies.rst +++ b/dependencies.rst @@ -62,8 +62,17 @@ When we publish this to PyPI, calling ``pip install funniest`` or similar will a Packages Not On PyPI ~~~~~~~~~~~~~~~~~~~~ +Sometimes you'll want to use packages that are properly arranged with setuptools, but aren't published to PyPI. In those cases, if you have pip version>=19.1, you can specify url of package in install_requires in PEP 508 format. -Sometimes you'll want to use packages that are properly arranged with setuptools, but aren't published to PyPI. In those cases, you can specify a list of one or more ``dependency_links`` URLs where the package can be downloaded, along with some additional hints, and setuptools will find and install the package correctly. +For example, if a library is published on GitHub, you can specify it like:: + + setup( + ... + install_requires=['package @ git+https://github.com/user/repo.git@branch'] + ... + ) + +For older pip versions, which doesnot support PEP 508 format, you can specify a list of one or more ``dependency_links`` URLs where the package can be downloaded, along with some additional hints, and setuptools will find and install the package correctly. This method is deprecated in newer pip versions. For example, if a library is published on GitHub, you can specify it like:: From 791ca6a192b15ab6e86b9b3840e3883137539f63 Mon Sep 17 00:00:00 2001 From: Saurabh Yadav Date: Wed, 15 May 2019 19:23:36 +0530 Subject: [PATCH 2/2] Update dependencies.rst Corrected pip version which support pep 508 format for external packages --- dependencies.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies.rst b/dependencies.rst index 6dca830..7cb89e0 100644 --- a/dependencies.rst +++ b/dependencies.rst @@ -62,7 +62,7 @@ When we publish this to PyPI, calling ``pip install funniest`` or similar will a Packages Not On PyPI ~~~~~~~~~~~~~~~~~~~~ -Sometimes you'll want to use packages that are properly arranged with setuptools, but aren't published to PyPI. In those cases, if you have pip version>=19.1, you can specify url of package in install_requires in PEP 508 format. +Sometimes you'll want to use packages that are properly arranged with setuptools, but aren't published to PyPI. In those cases, if you have pip version>=18.1, you can specify url of package in install_requires in PEP 508 format. For example, if a library is published on GitHub, you can specify it like::