replace import lhs with import_module(lhs)
This commit is contained in:
parent
a7e213af41
commit
dd3511eaa5
15
checkdeps.py
15
checkdeps.py
|
@ -153,18 +153,25 @@ for lhs, rhs in EXTRAS_REQUIRE.items():
|
|||
if x in EXTRAS_REQUIRE_DEPS
|
||||
]):
|
||||
print('lhs, rhs : ', lhs, rhs)
|
||||
print('CMD: ', CMD)
|
||||
print('[[OPSYS]]: ', ' '.join([''. join([xx for xx in EXTRAS_REQUIRE_DEPS[x][OPSYS]])for x in rhs if x in EXTRAS_REQUIRE_DEPS]))
|
||||
# print('CMD: ', CMD)
|
||||
# print('[xx for xx in EXTRAS_REQUIRE_DEPS[x][OPSYS]]: ', [xx for xx in EXTRAS_REQUIRE_DEPS[x][OPSYS]])
|
||||
# print('[]: ', [for x in rhs if x in EXTRAS_REQUIRE_DEPS])
|
||||
try:
|
||||
import lhs
|
||||
import_module(lhs)
|
||||
print('Try pass <<<<<<<<<<<<<Sucess>>>>>>>>>>>>>>>>')
|
||||
except Exception as e:
|
||||
print('Except <<<<<<<<<<<<<<Fail>>>>>>>>>>>>>>>>>>>')
|
||||
rhs_cmd = ''.join([
|
||||
CMD,
|
||||
' ',
|
||||
' '.join([''. join([xx for xx in EXTRAS_REQUIRE_DEPS[x][OPSYS]])for x in rhs if x in EXTRAS_REQUIRE_DEPS]),])
|
||||
' '.join([
|
||||
''. join([
|
||||
xx for xx in EXTRAS_REQUIRE_DEPS[x][OPSYS]
|
||||
])
|
||||
for x in rhs
|
||||
if x in EXTRAS_REQUIRE_DEPS
|
||||
]),
|
||||
])
|
||||
print('MMMMMMM: ', lhs, rhs_cmd)
|
||||
print(
|
||||
"Optional dependency `pip install .[{}]` would require `{}`"
|
||||
|
|
Reference in New Issue
Block a user