diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2016-02-27 09:19:56 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-02-27 09:19:56 -0500 |
| commit | 721536a8c21a0f6a0dcd0ca92b5e5a613fb42c5e (patch) | |
| tree | 3ddf84b3f4217a0217ec3f5d1ffce5d773f4a547 /pkg_resources/_vendor/packaging | |
| parent | 1edd380c867c08eedf5e396654b4ec3bed23e25d (diff) | |
| download | python-setuptools-git-721536a8c21a0f6a0dcd0ca92b5e5a613fb42c5e.tar.gz | |
Re-run vendoring on packaging 16.4 (adding utils.py module, apparently omitted).
Diffstat (limited to 'pkg_resources/_vendor/packaging')
| -rw-r--r-- | pkg_resources/_vendor/packaging/utils.py | 14 |
1 files changed, 14 insertions, 0 deletions
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() |
