Make safe_name compliant to PEP 503 and behaviour of pip > 8.1.2
Make safe_name compliant to PEP 503 and behaviour of pip > 8.1.2

According to PEP 503, a "normalized" project name has all runs of the
characters ., - and _ replaced with a single - character. [0]

Similarly, since version 8.1.2, that is the behaviour of pip as well. [1]

However, Setuptools still allows a . in the normalized name, which
is causing trouble down the line.

[0] https://www.python.org/dev/peps/pep-0503/#normalized-names
[1] https://github.com/pypa/pip/issues/3666

pypa/setuptools,pypa/setuptools,pypa/setuptools