Commits

Daniel Holth  committed fb7a900

parse METADATA as utf-8 for Python 3

  • Participants
  • Parent commits b616b61

Comments (0)

Files changed (2)

     install_requires.append('argparse')
 
 setup(name='wheel',
-      version='0.17.0',
+      version='0.18.0',
       description='A built-package format for Python.',
       long_description=README + '\n\n' +  CHANGES,
       classifiers=[

File wheel/metadata.py

 import os
 import textwrap
 import pkg_resources
+import email.parser
 
-METADATA_VERSION = "2.0"
+METADATA_VERSION = "2.0a0"
 
 PLURAL_FIELDS = { "classifier" : "classifiers",
                   "provides_dist" : "provides",
     """
 
     metadata = {}
-    pkg_info = read_pkg_info(path)
+    try:
+        unicode
+        pkg_info = read_pkg_info(path)
+    except NameError:
+        pkg_info = email.parser.Parser().parsestr(open(path, 'rb').read().decode('utf-8'))
     description = None
 
     if pkg_info['Summary']: