From 3b9a57a0c80ee11995fbe937e7dbeca3d83ec10a Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 24 May 2013 11:02:05 -0400 Subject: Use a wrapper to ensure unique values on find_external_links. Factors out uniqueness test into a re-usable decorator and simplifies the body of find_external_links. --HG-- branch : distribute --- setuptools/py24compat.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 setuptools/py24compat.py (limited to 'setuptools/py24compat.py') diff --git a/setuptools/py24compat.py b/setuptools/py24compat.py new file mode 100644 index 00000000..c5d7d204 --- /dev/null +++ b/setuptools/py24compat.py @@ -0,0 +1,11 @@ +""" +Forward-compatibility support for Python 2.4 and earlier +""" + +# from jaraco.compat 1.2 +try: + from functools import wraps +except ImportError: + def wraps(func): + "Just return the function unwrapped" + return lambda x: x -- cgit v1.2.1