Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Cleanup package name if not specified in makepackage

  • Loading branch information...
1 parent 37b93b8 commit 3bbffabdb0df441275f83f22863a574a2d66c411 @amol- amol- committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 gearbox/commands/basic_package/
5 gearbox/commands/basic_package/
@@ -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

0 comments on commit 3bbffab

Please sign in to comment.
Something went wrong with that request. Please try again.