[PATCH] D45211: Try to import parse_requirements from pip._internal.req too.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 3 08:04:29 PDT 2018


fhahn created this revision.
fhahn added reviewers: kristof.beyls, MatzeB, cmatthews.

Pip's internal modules have been moved to pip._internal in
95bcf8c5f6394298035a7332c441868f3b0169f4 [1], which is part of the 10.0.0b2
release.

[1] https://github.com/pypa/pip/commit/95bcf8c5f6394298035a7332c441868f3b0169f4


https://reviews.llvm.org/D45211

Files:
  setup.py


Index: setup.py
===================================================================
--- setup.py
+++ setup.py
@@ -1,4 +1,8 @@
-from pip.req import parse_requirements
+try:
+    from pip.req import parse_requirements
+except ImportError:
+    # The req module has been moved to pip._internal in the 10 release.
+    from pip._internal.req import parse_requirements
 import lnt
 import os
 from sys import platform as _platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45211.140796.patch
Type: text/x-patch
Size: 426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180403/d0c1db04/attachment.bin>


More information about the llvm-commits mailing list