add BaseCommand

adds missing `get_inputs` and `get_outputs`

used by pip.
This commit is contained in:
MinRK
2014-09-09 22:58:48 -07:00
parent 9c0f965e06
commit 2e7463a894

View File

@@ -106,9 +106,8 @@ setup_args = dict(
from distutils.cmd import Command from distutils.cmd import Command
from distutils.command.install import install from distutils.command.install import install
class Bower(Command): class BaseCommand(Command):
description = "fetch static components with bower" """Dumb empty command because Command needs subclasses to override too much"""
user_options = [] user_options = []
def initialize_options(self): def initialize_options(self):
@@ -117,12 +116,24 @@ class Bower(Command):
def finalize_options(self): def finalize_options(self):
pass pass
def get_inputs(self):
return []
def get_outputs(self):
return []
class Bower(BaseCommand):
description = "fetch static components with bower"
user_options = []
def run(self): def run(self):
check_call(['bower', 'install', '--allow-root']) check_call(['bower', 'install', '--allow-root'])
# update data-files in case this created new files # update data-files in case this created new files
self.distribution.data_files = get_data_files() self.distribution.data_files = get_data_files()
class CSS(Command): class CSS(BaseCommand):
description = "compile CSS from LESS" description = "compile CSS from LESS"
user_options = [] user_options = []