guetzli-recursively-gui/.eggs/py2app-0.12-py3.6.egg/py2app/recipes/ftplib.py

15 lines
407 B
Python
Raw Normal View History

2017-04-20 00:57:59 +02:00
import sys
from modulegraph.modulegraph import MissingModule
def check(cmd, mf):
if sys.version_info[0] != 2: return {}
# ftplib has an optional dependency on an external (and likely
# non-existing) SOCKS module.
f = mf.findNode('ftplib')
m = mf.findNode('SOCKS')
if m is not None and f is not None and isinstance(m, MissingModule):
mf.removeReference(f, m)
return {}