Merge pull request #724 from AndreMiras/feature/install_reqs_fixes

Updates p4a deps parsing
This commit is contained in:
Peter Badida 2018-10-20 12:19:18 +02:00 committed by GitHub
commit 618faa076d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -521,13 +521,13 @@ class TargetAndroid(Target):
try:
with open(join(self.pa_dir, "setup.py")) as fd:
setup = fd.read()
deps = re.findall("install_reqs = (\[[^\]]*\])", setup, re.DOTALL | re.MULTILINE)[1]
deps = re.findall("^install_reqs = (\[[^\]]*\])", setup, re.DOTALL | re.MULTILINE)[0]
deps = ast.literal_eval(deps)
except Exception:
deps = []
pip_deps = []
for dep in deps:
pip_deps.append('"{}"'.format(dep))
pip_deps.append("'{}'".format(dep))
# in virtualenv or conda env
options = "--user"