New distutils from Python 2.3a2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -93,6 +93,8 @@ class Distribution:
|
||||
"print the long package description"),
|
||||
('platforms', None,
|
||||
"print the list of platforms"),
|
||||
('classifiers', None,
|
||||
"print the list of classifiers"),
|
||||
('keywords', None,
|
||||
"print the list of keywords"),
|
||||
]
|
||||
@@ -634,6 +636,8 @@ class Distribution:
|
||||
value = getattr(self.metadata, "get_"+opt)()
|
||||
if opt in ['keywords', 'platforms']:
|
||||
print string.join(value, ',')
|
||||
elif opt == 'classifiers':
|
||||
print string.join(value, '\n')
|
||||
else:
|
||||
print value
|
||||
any_display_options = 1
|
||||
@@ -962,7 +966,8 @@ class DistributionMetadata:
|
||||
"maintainer", "maintainer_email", "url",
|
||||
"license", "description", "long_description",
|
||||
"keywords", "platforms", "fullname", "contact",
|
||||
"contact_email", "licence")
|
||||
"contact_email", "licence", "classifiers",
|
||||
"download_url")
|
||||
|
||||
def __init__ (self):
|
||||
self.name = None
|
||||
@@ -977,6 +982,8 @@ class DistributionMetadata:
|
||||
self.long_description = None
|
||||
self.keywords = None
|
||||
self.platforms = None
|
||||
self.classifiers = None
|
||||
self.download_url = None
|
||||
|
||||
def write_pkg_info (self, base_dir):
|
||||
"""Write the PKG-INFO file into the release tree.
|
||||
@@ -992,6 +999,8 @@ class DistributionMetadata:
|
||||
pkg_info.write('Author: %s\n' % self.get_contact() )
|
||||
pkg_info.write('Author-email: %s\n' % self.get_contact_email() )
|
||||
pkg_info.write('License: %s\n' % self.get_license() )
|
||||
if self.download_url:
|
||||
pkg_info.write('Download-URL: %s\n' % self.download_url)
|
||||
|
||||
long_desc = rfc822_escape( self.get_long_description() )
|
||||
pkg_info.write('Description: %s\n' % long_desc)
|
||||
@@ -1003,6 +1012,9 @@ class DistributionMetadata:
|
||||
for platform in self.get_platforms():
|
||||
pkg_info.write('Platform: %s\n' % platform )
|
||||
|
||||
for classifier in self.get_classifiers():
|
||||
pkg_info.write('Classifier: %s\n' % classifier )
|
||||
|
||||
pkg_info.close()
|
||||
|
||||
# write_pkg_info ()
|
||||
@@ -1059,6 +1071,12 @@ class DistributionMetadata:
|
||||
def get_platforms(self):
|
||||
return self.platforms or ["UNKNOWN"]
|
||||
|
||||
def get_classifiers(self):
|
||||
return self.classifiers or []
|
||||
|
||||
def get_download_url(self):
|
||||
return self.download_url or "UNKNOWN"
|
||||
|
||||
# class DistributionMetadata
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user