diff options
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" |