From bb02bbd8583b39437473c0560afb3e4162fa80ab Mon Sep 17 00:00:00 2001 From: MinRK Date: Fri, 12 Sep 2014 11:37:37 -0700 Subject: [PATCH] run bower/css in develop ensures js/css dependencies are installed after `pip install -e` --- setup.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setup.py b/setup.py index 57ba0c7a..684259cd 100755 --- a/setup.py +++ b/setup.py @@ -167,10 +167,20 @@ setup_args['cmdclass'] = { 'css': CSS, } + # setuptools requirements if 'setuptools' in sys.modules: setup_args['zip_safe'] = False + from setuptools.command.develop import develop + class develop_js_css(develop): + def run(self): + if not self.uninstall: + self.distribution.run_command('bower') + self.distribution.run_command('css') + develop.run(self) + setup_args['cmdclass']['develop'] = develop_js_css + with open('requirements.txt') as f: install_requires = [ line.strip() for line in f.readlines() ]