Commit a24a73e7 authored by PJ Eby's avatar PJ Eby

Workaround for packages that think 'version' is a number.

--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4042337
parent afdfd43b
...@@ -118,7 +118,7 @@ def check_package_data(dist, attr, value): ...@@ -118,7 +118,7 @@ def check_package_data(dist, attr, value):
"wildcard patterns" "wildcard patterns"
) )
class Distribution(_Distribution): class Distribution(_Distribution):
...@@ -221,6 +221,9 @@ class Distribution(_Distribution): ...@@ -221,6 +221,9 @@ class Distribution(_Distribution):
_Distribution.__init__(self,attrs) _Distribution.__init__(self,attrs)
if isinstance(self.metadata.version, (int,long,float)):
# Some people apparently take "version number" too literally :)
self.metadata.version = str(self.metadata.version)
def parse_command_line(self): def parse_command_line(self):
"""Process features after parsing command line options""" """Process features after parsing command line options"""
...@@ -241,9 +244,6 @@ class Distribution(_Distribution): ...@@ -241,9 +244,6 @@ class Distribution(_Distribution):
): ):
working_set.add(dist) working_set.add(dist)
def finalize_options(self): def finalize_options(self):
_Distribution.finalize_options(self) _Distribution.finalize_options(self)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment