@@ -966,7 +966,8 @@ class DistributionMetadata:
966966 "maintainer" , "maintainer_email" , "url" ,
967967 "license" , "description" , "long_description" ,
968968 "keywords" , "platforms" , "fullname" , "contact" ,
969- "contact_email" , "licence" , "classifiers" )
969+ "contact_email" , "licence" , "classifiers" ,
970+ "download_url" )
970971
971972 def __init__ (self ):
972973 self .name = None
@@ -982,6 +983,7 @@ def __init__ (self):
982983 self .keywords = None
983984 self .platforms = None
984985 self .classifiers = None
986+ self .download_url = None
985987
986988 def write_pkg_info (self , base_dir ):
987989 """Write the PKG-INFO file into the release tree.
@@ -997,6 +999,8 @@ def write_pkg_info (self, base_dir):
997999 pkg_info .write ('Author: %s\n ' % self .get_contact () )
9981000 pkg_info .write ('Author-email: %s\n ' % self .get_contact_email () )
9991001 pkg_info .write ('License: %s\n ' % self .get_license () )
1002+ if self .download_url :
1003+ pkg_info .write ('Download-URL: %s\n ' % self .download_url )
10001004
10011005 long_desc = rfc822_escape ( self .get_long_description () )
10021006 pkg_info .write ('Description: %s\n ' % long_desc )
@@ -1070,6 +1074,9 @@ def get_platforms(self):
10701074 def get_classifiers (self ):
10711075 return self .classifiers or []
10721076
1077+ def get_download_url (self ):
1078+ return self .download_url or "UNKNOWN"
1079+
10731080# class DistributionMetadata
10741081
10751082
0 commit comments