1. PyPA
  2. Python Packaging Authority Projects
  3. distlib

Commits

Vinay Sajip  committed 07a1a67

Added new metadata properties for exports, commands etc.

  • Participants
  • Parent commits 58c92e1
  • Branches default

Comments (0)

Files changed (1)

File distlib/metadata.py

View file
  • Ignore whitespace
 
     common_keys = set(('name', 'version', 'license', 'keywords', 'summary'))
 
+    none_list = (None, list)
+    none_dict = (None, dict)
+
     mapped_keys = {
         'run_requires': ('Requires-Dist', list),
         'build_requires': ('Setup-Requires-Dist', list),
-        'dev_requires': (None, list),
-        'test_requires': (None, list),
-        'meta_requires': (None, list),
+        'dev_requires': none_list,
+        'test_requires': none_list,
+        'meta_requires': none_list,
         'extras': ('Provides-Extra', list),
+        'modules': none_list,
+        'namespaces': none_list,
+        'exports': none_dict,
+        'commands': none_dict,
         'classifiers': ('Classifier', list),
         'source_url': ('Download-URL', None),
         'metadata_version': ('Metadata-Version', None),
     }
 
+    del none_list, none_dict
+
     def __getattribute__(self, key):
         common = object.__getattribute__(self, 'common_keys')
         mapped = object.__getattribute__(self, 'mapped_keys')