From e62e2bb1315ff641f670faa64819216cd712c194 Mon Sep 17 00:00:00 2001
From: Andrey <andrey-git@users.noreply.github.com>
Date: Wed, 18 Jul 2018 13:16:27 +0300
Subject: [PATCH] Make sure that only pypi dependencies are used (#15490)

---
 script/gen_requirements_all.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/script/gen_requirements_all.py b/script/gen_requirements_all.py
index 9a5b4dd1a43..d92502de078 100755
--- a/script/gen_requirements_all.py
+++ b/script/gen_requirements_all.py
@@ -182,6 +182,10 @@ def gather_modules():
         for req in module.REQUIREMENTS:
             if req in IGNORE_REQ:
                 continue
+            if '://' in req:
+                errors.append(
+                    "{}[Only pypi dependencies are allowed: {}]".format(
+                        package, req))
             if req.partition('==')[1] == '' and req not in IGNORE_PIN:
                 errors.append(
                     "{}[Please pin requirement {}, see {}]".format(
@@ -257,7 +261,7 @@ def write_requirements_file(data):
 
 
 def write_test_requirements_file(data):
-    """Write the modules to the requirements_all.txt."""
+    """Write the modules to the requirements_test_all.txt."""
     with open('requirements_test_all.txt', 'w+', newline="\n") as req_file:
         req_file.write(data)
 
@@ -275,7 +279,7 @@ def validate_requirements_file(data):
 
 
 def validate_requirements_test_file(data):
-    """Validate if requirements_all.txt is up to date."""
+    """Validate if requirements_test_all.txt is up to date."""
     with open('requirements_test_all.txt', 'r') as req_file:
         return data == req_file.read()
 
-- 
GitLab