diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-02-27 12:58:56 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-02-27 12:58:56 (GMT) |
commit | 38e3d51ea734e1c5d6979774977a03773092926a (patch) | |
tree | 507f35e3495c8c4d719cd2bd4b2f978ca97a6a51 /Lib/distutils/command/upload.py | |
parent | 89fc2b78214b97f7bc5d3fcf32d9e4cb9940c1dd (diff) | |
download | cpython-38e3d51ea734e1c5d6979774977a03773092926a.zip cpython-38e3d51ea734e1c5d6979774977a03773092926a.tar.gz cpython-38e3d51ea734e1c5d6979774977a03773092926a.tar.bz2 |
Merged revisions 70017 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r70017 | tarek.ziade | 2009-02-27 13:53:34 +0100 (Fri, 27 Feb 2009) | 1 line
Issue #5052: make Distutils compatible with 2.3 again.
........
Diffstat (limited to 'Lib/distutils/command/upload.py')
-rw-r--r-- | Lib/distutils/command/upload.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py index 020e860..eb2f516 100644 --- a/Lib/distutils/command/upload.py +++ b/Lib/distutils/command/upload.py @@ -6,7 +6,7 @@ from distutils.errors import * from distutils.core import PyPIRCCommand from distutils.spawn import spawn from distutils import log -from hashlib import md5 +import sys import os, io import socket import platform @@ -15,6 +15,12 @@ import http.client as httpclient import base64 import urllib.parse +# this keeps compatibility for 2.3 and 2.4 +if sys.version < "2.5": + from md5 import md5 +else: + from hashlib import md5 + class upload(PyPIRCCommand): description = "upload binary package to PyPI" |