implemented dependency checks in checkdeps module
This commit is contained in:
parent
9265235053
commit
d2a340d012
31
checkdeps.py
31
checkdeps.py
|
@ -144,20 +144,23 @@ for lhs, rhs in EXTRAS_REQUIRE.items():
|
||||||
for x in rhs
|
for x in rhs
|
||||||
if x in EXTRAS_REQUIRE_DEPS
|
if x in EXTRAS_REQUIRE_DEPS
|
||||||
]):
|
]):
|
||||||
rhs_cmd = ''.join([
|
try:
|
||||||
CMD,
|
import_module(lhs)
|
||||||
' ',
|
except Exception as e:
|
||||||
' '.join([
|
rhs_cmd = ''.join([
|
||||||
''. join([
|
CMD,
|
||||||
xx for xx in EXTRAS_REQUIRE_DEPS[x][OPSYS]
|
' ',
|
||||||
])
|
' '.join([
|
||||||
for x in rhs
|
''. join([
|
||||||
if x in EXTRAS_REQUIRE_DEPS
|
xx for xx in EXTRAS_REQUIRE_DEPS[x][OPSYS]
|
||||||
]),
|
])
|
||||||
])
|
for x in rhs
|
||||||
print(
|
if x in EXTRAS_REQUIRE_DEPS
|
||||||
"Optional dependency `pip install .[{}]` would require `{}`"
|
]),
|
||||||
" to be run as root".format(lhs, rhs_cmd))
|
])
|
||||||
|
print(
|
||||||
|
"Optional dependency `pip install .[{}]` would require `{}`"
|
||||||
|
" to be run as root".format(lhs, rhs_cmd))
|
||||||
|
|
||||||
if (not compiler or prereqs) and OPSYS in PACKAGE_MANAGER:
|
if (not compiler or prereqs) and OPSYS in PACKAGE_MANAGER:
|
||||||
print("You can install the missing dependencies by running, as root:")
|
print("You can install the missing dependencies by running, as root:")
|
||||||
|
|
Reference in New Issue
Block a user