diff options
-rw-r--r-- | baserockimport/app.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/baserockimport/app.py b/baserockimport/app.py index cd3203e..0b190e5 100644 --- a/baserockimport/app.py +++ b/baserockimport/app.py @@ -206,6 +206,10 @@ class BaserockImportApplication(cliapp.Application): def import_python(self, args): '''Import one or more python packages.''' + + def comp(x, y): + return x.replace('-', '_').lower() == y.replace('-', '_').lower() + if len(args) < 1 or len(args) > 2: raise cliapp.AppException( 'Please pass the name of the python package on the commandline.') @@ -218,5 +222,6 @@ class BaserockImportApplication(cliapp.Application): goal_kind='python', goal_name=package_name, goal_version=package_version) - loop.enable_importer('python', strata=['strata/core.morph']) + loop.enable_importer('python', strata=['strata/core.morph'], + package_comp_callback=comp) loop.run() |