summaryrefslogtreecommitdiff
path: root/setuptools/py24compat.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-05-24 11:02:05 -0400
committerJason R. Coombs <jaraco@jaraco.com>2013-05-24 11:02:05 -0400
commit301f59b28e83d9adbb00dd4cf8f26c1bd6acf50b (patch)
tree0ad43366ffeb39445df424e0dd6d6ea8c1f24f75 /setuptools/py24compat.py
parent43a53441c28b52799056a6d2c82559aa3128d8ac (diff)
downloadpython-setuptools-bitbucket-301f59b28e83d9adbb00dd4cf8f26c1bd6acf50b.tar.gz
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.
Diffstat (limited to 'setuptools/py24compat.py')
-rw-r--r--setuptools/py24compat.py11
1 files changed, 11 insertions, 0 deletions
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