Fix exclude list on python 3.2+

imp.get_tag() is only available on 3.2+. Since 2<x<3.2 are EOL we shall
not worry.
We could implement a local get_tag(), but the point is moot: this
compilation tactic with __pycache__ subdirs and versioned import files
is new to python 3.x, so hasattr() is sufficient.
Commit the fix we did when testing python3

I shall `hg status` before submitting PRs.
I shall `hg status` before submitting PRs.
I shall `hg status` before submitting PRs.
Chase upstream
[Fix/Typo] Fix missing parenthesis in egg_info.py

Syntax error introduced in be37eff86c761a399c1ec98b0e5eeed9a90c9cd7
make order of lines in top_level.txt deterministic

without this, every build produces a different result, as the lines are
ordered randomly.

This makes builds reproducible.
If you build a package two times, you get the same result, as you would
expect. Basically the same thing was already done for requirements and
entry_points.txt

It is useful e.g. if you want to rebuild a package that you downloaded,
to ensure that no-one tampered with it, or even if you just want to
examine the differences between two builds/versions of one package.
Merged in mesocody/setuptools (pull request #72)

Fix exclude list on python 3.2+
Normalize syntax
Extract method for generating exclude names
Generate the filenames more directly.
Extract calculation of base path
Add comment
Construct exclusions as a set
Add docstring for get_exclusions. Just return the set as it is a sized container.
Extract method for calculating namespace packages for single_version_externally_managed
Extract method for computing parent packages of a package
Extract path calculation for paths
Rewrite package traversal as a generator expression
Reindent
Use itertools.product for a cross-product of two iterables
Reorganize imports