diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2013-05-24 11:02:05 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-05-24 11:02:05 -0400 |
| commit | 3b9a57a0c80ee11995fbe937e7dbeca3d83ec10a (patch) | |
| tree | fb099a4c0c184f971478248c43187ababbf86be0 /setuptools/py24compat.py | |
| parent | b8327d7f646141415beb30acd39ce8840ebc708b (diff) | |
| download | python-setuptools-git-3b9a57a0c80ee11995fbe937e7dbeca3d83ec10a.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.
--HG--
branch : distribute
Diffstat (limited to 'setuptools/py24compat.py')
| -rw-r--r-- | setuptools/py24compat.py | 11 |
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 |
