summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Holth <dholth@fastmail.fm>2012-07-12 13:58:17 -0400
committerDaniel Holth <dholth@fastmail.fm>2012-07-12 13:58:17 -0400
commitf6b452d45dd01d567865bf89b798a48f65a3e277 (patch)
tree4be57caa14eb7ad26c26cf09a0e8bf0e46915580
parentfcd7a06e22834eb746a08ff235badf10b264b21a (diff)
downloadwheel-f6b452d45dd01d567865bf89b798a48f65a3e277.tar.gz
hyphenated name fix
-rw-r--r--CHANGES.txt4
-rw-r--r--setup.py2
-rw-r--r--wheel/bdist_wheel.py4
3 files changed, 8 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 0fb5065..90f8b5d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+0.4.2
+=====
+- hyphenated name fix
+
0.4
===
- improve test coverage
diff --git a/setup.py b/setup.py
index 2d73991..15af218 100644
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,7 @@ README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
setup(name='wheel',
- version='0.4.1',
+ version='0.4.2',
description='A built-package format for Python.',
long_description=README + '\n\n' + CHANGES,
classifiers=[
diff --git a/wheel/bdist_wheel.py b/wheel/bdist_wheel.py
index 78a0f0e..ab30f6d 100644
--- a/wheel/bdist_wheel.py
+++ b/wheel/bdist_wheel.py
@@ -15,6 +15,7 @@ except ImportError: # pragma nocover
import distutils.sysconfig as sysconfig
import pkg_resources
+from pkg_resources import safe_name, safe_version
from shutil import rmtree
from email.parser import Parser
@@ -100,7 +101,8 @@ class bdist_wheel(Command):
@property
def wheel_dist_name(self):
"""Return distribution full name with - replaced with _"""
- return self.distribution.get_fullname().replace('-', '_')
+ return '-'.join((safe_name(self.distribution.get_name()),
+ safe_version(self.distribution.get_version())))
def get_archive_basename(self):
"""Return archive name without extension"""