changeset 693:a06689439eb0

Don't use pip to parse requirements.txt. This was not a public API
author Stefano Rivera <stefano@rivera.za.net>
date Tue, 10 Sep 2019 17:00:01 -0300
parents 6cd8182a05d8
children c5be55acf470
files setup.py
diffstat 1 files changed, 4 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Tue Sep 10 16:50:53 2019 -0300
+++ b/setup.py	Tue Sep 10 17:00:01 2019 -0300
@@ -12,15 +12,10 @@
 except ImportError:
     pass
 
-try:
-    from pip.req import parse_requirements
-    import os
-    game_dir = os.path.dirname(__file__)
-    req_file = os.path.join(game_dir, 'requirements.txt')
-    install_reqs = parse_requirements(req_file)
-    reqs = [str(ir.req) for ir in install_reqs]
-except ImportError:
-    reqs = []
+reqs = []
+with open('requirements.txt') as f:
+    for line in f:
+        reqs.append(line.strip())
 
 # This should probably be pulled from constants.py
 VERSION_STR = "0.1"