From 94ec7381471b7dad69a1b2468750ae3a0a1f3663 Mon Sep 17 00:00:00 2001 From: Ross Karchner Date: Wed, 5 Oct 2016 14:35:27 -0400 Subject: [PATCH] use cfgov_setup to build frontend assets --- setup.py | 50 ++------------------------------------------------ 1 file changed, 2 insertions(+), 48 deletions(-) diff --git a/setup.py b/setup.py index 31aeeae..236b341 100755 --- a/setup.py +++ b/setup.py @@ -1,10 +1,5 @@ import os from setuptools import setup, find_packages -from subprocess import call -from setuptools import Command -from distutils.command.build_ext import build_ext as _build_ext -from setuptools.command.bdist_egg import bdist_egg as _bdist_egg -from wheel.bdist_wheel import bdist_wheel as _bdist_wheel def read_file(filename): @@ -17,43 +12,6 @@ def read_file(filename): return '' -class build_frontend(Command): - """ A command class to run `setup.sh` """ - description = 'build front-end JavaScript and CSS' - user_options = [] - - def initialize_options(self): - pass - - def finalize_options(self): - pass - - def run(self): - print __file__ - call(['./setup.sh'], - cwd=os.path.dirname(os.path.abspath(__file__))) - - -class build_ext(_build_ext): - """ A build_ext subclass that adds build_frontend """ - def run(self): - self.run_command('build_frontend') - _build_ext.run(self) - - -class bdist_egg(_bdist_egg): - """ A bdist_egg subclass that runs build_frontend """ - def run(self): - self.run_command('build_frontend') - _bdist_egg.run(self) - - -class bdist_wheel(_bdist_wheel): - """ A bdist_wheel subclass that runs build_frontend """ - def run(self): - self.run_command('build_frontend') - _bdist_wheel.run(self) - setup( name='college-costs', version='2.2.4', @@ -94,10 +52,6 @@ def run(self): ], long_description=read_file('README.md'), zip_safe=False, - cmdclass={ - 'build_frontend': build_frontend, - 'build_ext': build_ext, - 'bdist_egg': bdist_egg, - 'bdist_wheel': bdist_wheel, - }, + setup_requires=['cfgov_setup==1.2',], + frontend_build_script='setup.sh' )