Daniel Holth avatar Daniel Holth committed 918a146

preserve all declared extras

Comments (0)

Files changed (1)

wheel/metadata.py

             if extra_requirements:
                 metadata['may_require'] = [{'extra':key, 'dependencies':value} 
                         for key, value in sorted(extra_requirements.items())]
-                metadata['extras'] = [key for key in sorted(extra_requirements.keys())]
+                if not 'extras' in metadata:
+                    metadata['extras'] = []
+                metadata['extras'].extend([key for key in sorted(extra_requirements.keys())])
 
         elif low_key == 'provides_extra':
             if not 'extras' in metadata:
 
     metadata['metadata_version'] = METADATA_VERSION
     
-    # include extra information if distribution is available
+    metadata['extras'] = sorted(unique(metadata['extras']))
+    
+    # include more information if distribution is available
     if distribution:
         for requires, attr in (('test_requires', 'tests_require'),):
             try:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.