Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleanup package name if not specified in makepackage

  • Loading branch information...
commit 3bbffabdb0df441275f83f22863a574a2d66c411 1 parent 37b93b8
@amol- amol- authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 gearbox/commands/basic_package/command.py
View
5 gearbox/commands/basic_package/command.py
@@ -1,8 +1,11 @@
from __future__ import print_function
from gearbox.command import TemplateCommand
+import re
class MakePackageCommand(TemplateCommand):
+ CLEAN_PACKAGE_NAME_RE = re.compile('[^a-zA-Z0-9_]')
+
def get_description(self):
return 'Creates a basic python package'
@@ -49,7 +52,7 @@ def get_parser(self, prog_name):
def take_action(self, opts):
if opts.package is None:
- opts.package = opts.project
+ opts.package = self.CLEAN_PACKAGE_NAME_RE.sub('', opts.project.lower())
if opts.output_dir is None:
opts.output_dir = opts.project
Please sign in to comment.
Something went wrong with that request. Please try again.