aboutsummaryrefslogtreecommitdiffstats
path: root/pkg_resources
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-12-24 17:11:49 -0500
committerJason R. Coombs <jaraco@jaraco.com>2014-12-24 17:11:49 -0500
commit170657b68f4b92e7e1bf82f5e19a831f5744af67 (patch)
tree052875ac1190391aaae80ad7ba6f5a1bebeb3828 /pkg_resources
parent9063c163e105545bacb67865f5d35056eb342a49 (diff)
downloadexternal_python_setuptools-170657b68f4b92e7e1bf82f5e19a831f5744af67.tar.gz
external_python_setuptools-170657b68f4b92e7e1bf82f5e19a831f5744af67.tar.bz2
external_python_setuptools-170657b68f4b92e7e1bf82f5e19a831f5744af67.zip
Setuptools now uses the 'packaging' package from pkg_resources, unifying the behavior around resolution of that package.
Diffstat (limited to 'pkg_resources')
-rw-r--r--pkg_resources/__init__.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index 699ac114..a055cf1a 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -75,9 +75,14 @@ try:
except ImportError:
pass
-import pkg_resources._vendor.packaging.version
-import pkg_resources._vendor.packaging.specifiers
-packaging = pkg_resources._vendor.packaging
+try:
+ import packaging.version
+ import packaging.specifiers
+except ImportError:
+ # fallback to vendored version
+ import pkg_resources._vendor.packaging.version
+ import pkg_resources._vendor.packaging.specifiers
+ packaging = pkg_resources._vendor.packaging
class PEP440Warning(RuntimeWarning):