diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2015-03-20 15:55:54 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-03-20 15:55:54 -0400 |
| commit | 110e541bd3a2df54492b8aaae6e041601653ca66 (patch) | |
| tree | 058a246619e65780b130f33263bb4b70ca02f921 /pkg_resources | |
| parent | 5e00a02ea1f7473c952d4d359891db4f53ac1778 (diff) | |
| parent | 8ae39ab3a0bb12f17d2cabfdc27725b0992ba3c3 (diff) | |
| download | python-setuptools-git-110e541bd3a2df54492b8aaae6e041601653ca66.tar.gz | |
Merge backout
Diffstat (limited to 'pkg_resources')
| -rw-r--r-- | pkg_resources/__init__.py | 3 | ||||
| -rw-r--r-- | pkg_resources/tests/test_resources.py | 10 |
2 files changed, 1 insertions, 12 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 6aac8296..b12ad0e0 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2269,14 +2269,13 @@ CBRACKET = re.compile(r"\s*\]").match MODULE = re.compile(r"\w+(\.\w+)*$").match EGG_NAME = re.compile( r""" - (?P<name>.*?) ( + (?P<name>[^-]+) ( -(?P<ver>[^-]+) ( -py(?P<pyver>[^-]+) ( -(?P<plat>.+) )? )? )? - $ """, re.VERBOSE | re.IGNORECASE, ).match diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 92f076a1..a55478a2 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -207,16 +207,6 @@ class TestDistro: with pytest.raises(pkg_resources.UnknownExtra): d.requires(["foo"]) - def test_pkg_name_with_hyphen(self): - "Package names with hyphens are supported" - name = 'setuptools-markdown-1.0.egg' - dist = Distribution.from_filename(name) - assert dist.project_name == "setuptools-markdown" - assert dist.key == "setuptools-markdown" - assert dist.version == "1.0" - assert dist.py_version is None - assert dist.platform is None - class TestWorkingSet: def test_find_conflicting(self): |
