diff options
Diffstat (limited to 'meta-phosphor/common/recipes-devtools/python/python-email-utils-standalone/setup.patch')
-rw-r--r-- | meta-phosphor/common/recipes-devtools/python/python-email-utils-standalone/setup.patch | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-devtools/python/python-email-utils-standalone/setup.patch b/meta-phosphor/common/recipes-devtools/python/python-email-utils-standalone/setup.patch new file mode 100644 index 000000000..8087641fc --- /dev/null +++ b/meta-phosphor/common/recipes-devtools/python/python-email-utils-standalone/setup.patch @@ -0,0 +1,74 @@ +Index: email-4.0.2/email/__init__.py +=================================================================== +--- email-4.0.2.orig/email/__init__.py ++++ email-4.0.2/email/__init__.py +@@ -8,7 +8,6 @@ __version__ = '4.0.2' + + __all__ = [ + # Old names +- 'base64MIME', + 'Charset', + 'Encoders', + 'Errors', +@@ -16,20 +15,11 @@ __all__ = [ + 'Header', + 'Iterators', + 'Message', +- 'MIMEAudio', +- 'MIMEBase', +- 'MIMEImage', +- 'MIMEMessage', +- 'MIMEMultipart', +- 'MIMENonMultipart', +- 'MIMEText', + 'Parser', +- 'quopriMIME', + 'Utils', + 'message_from_string', + 'message_from_file', + # new names +- 'base64mime', + 'charset', + 'encoders', + 'errors', +@@ -37,9 +27,7 @@ __all__ = [ + 'header', + 'iterators', + 'message', +- 'mime', + 'parser', +- 'quoprimime', + 'utils', + ] + +@@ -94,30 +82,9 @@ _LOWERNAMES = [ + 'Message', + 'Parser', + 'Utils', +- 'base64MIME', +- 'quopriMIME', +- ] +- +-_MIMENAMES = [ +- # email.MIME<old name> -> email.mime.<new name is lowercased old name> +- 'Audio', +- 'Base', +- 'Image', +- 'Message', +- 'Multipart', +- 'NonMultipart', +- 'Text', + ] + + for _name in _LOWERNAMES: + importer = LazyImporter(_name.lower()) + sys.modules['email.' + _name] = importer + setattr(sys.modules['email'], _name, importer) +- +- +-import email.mime +-for _name in _MIMENAMES: +- importer = LazyImporter('mime.' + _name.lower()) +- sys.modules['email.MIME' + _name] = importer +- setattr(sys.modules['email'], 'MIME' + _name, importer) +- setattr(sys.modules['email.mime'], _name, importer) |