From 721536a8c21a0f6a0dcd0ca92b5e5a613fb42c5e Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Feb 2016 09:19:56 -0500 Subject: Re-run vendoring on packaging 16.4 (adding utils.py module, apparently omitted). --- pkg_resources/_vendor/packaging/utils.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 pkg_resources/_vendor/packaging/utils.py (limited to 'pkg_resources') diff --git a/pkg_resources/_vendor/packaging/utils.py b/pkg_resources/_vendor/packaging/utils.py new file mode 100644 index 00000000..942387ce --- /dev/null +++ b/pkg_resources/_vendor/packaging/utils.py @@ -0,0 +1,14 @@ +# This file is dual licensed under the terms of the Apache License, Version +# 2.0, and the BSD License. See the LICENSE file in the root of this repository +# for complete details. +from __future__ import absolute_import, division, print_function + +import re + + +_canonicalize_regex = re.compile(r"[-_.]+") + + +def canonicalize_name(name): + # This is taken from PEP 503. + return _canonicalize_regex.sub("-", name).lower() -- cgit v1.2.3