guetzli-recursively-gui/.eggs/py2app-0.12-py3.6.egg/py2app/recipes/xml.py
2017-04-20 00:57:59 +02:00

14 lines
385 B
Python

import sys
from modulegraph.modulegraph import MissingModule
def check(cmd, mf):
if sys.version_info[0] != 2: return {}
# Optional dependency on XML+ package in the stdlib, ignore
# this when the package isn't present.
m = mf.findNode('_xmlplus')
if m is not None and isinstance(m, MissingModule):
mf.removeReference(mf.findNode('xml'), m)
return {}