From 49d60e8f83904e51706acea1af04a9cc3f4c7fc8 Mon Sep 17 00:00:00 2001 From: Adam Kaufman Date: Tue, 24 Jan 2017 12:10:50 -0500 Subject: [PATCH] fix problem which cropped up in new python versions --- hatchery/project.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hatchery/project.py b/hatchery/project.py index 780165e..bf59c96 100644 --- a/hatchery/project.py +++ b/hatchery/project.py @@ -5,9 +5,14 @@ import microcache import pypandoc import funcy -from pkg_resources.extern import packaging from . import helpers +# packaging got moved into its own top-level package in recent python versions +try: + from pkg_resources.extern import packaging +except ImportError: + import packaging + logger = logging.getLogger(__name__) logging.getLogger('requests').setLevel(logging.ERROR)