diff options
| author | Roy Hyunjin Han <rhh@crosscompute.com> | 2014-07-10 14:08:47 -0700 |
|---|---|---|
| committer | Roy Hyunjin Han <rhh@crosscompute.com> | 2014-07-10 14:08:47 -0700 |
| commit | cd299ae7a21a95c1023c2b7c38624234ead1d464 (patch) | |
| tree | 705974b1aef64856f13acee4af195603a48310f5 | |
| parent | 3f87c228c920edbb85a85f3332a5340063e49b11 (diff) | |
| download | pyramid-cd299ae7a21a95c1023c2b7c38624234ead1d464.tar.gz pyramid-cd299ae7a21a95c1023c2b7c38624234ead1d464.tar.bz2 pyramid-cd299ae7a21a95c1023c2b7c38624234ead1d464.zip | |
Allow hyphens in project name
Convert hyphens in project_name to underscores in pkg_name
| -rw-r--r-- | pyramid/scripts/pcreate.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pyramid/scripts/pcreate.py b/pyramid/scripts/pcreate.py index 4c1f432fb..edf2c39f7 100644 --- a/pyramid/scripts/pcreate.py +++ b/pyramid/scripts/pcreate.py @@ -81,7 +81,8 @@ class PCreateCommand(object): args = self.args output_dir = os.path.abspath(os.path.normpath(args[0])) project_name = os.path.basename(os.path.split(output_dir)[1]) - pkg_name = _bad_chars_re.sub('', project_name.lower()) + pkg_name = _bad_chars_re.sub( + '', project_name.lower().replace('-', '_')) safe_name = pkg_resources.safe_name(project_name) egg_name = pkg_resources.to_filename(safe_name) |
