forked from eregs/regulations-site
-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
64 lines (52 loc) · 1.52 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from setuptools import setup, find_packages
import os
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
class build_frontend(Command):
""" A command class to run `frontendbuild.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(['./frontendbuild.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)
setup(
name="regulations",
version="2.0.0",
packages=find_packages(),
install_requires=[
'boto3',
'cached-property',
'celery',
'django>=1.8,<1.9',
'jinja2',
'requests',
'six',
'requests-toolbelt',
],
cmdclass={
'build_frontend': build_frontend,
'build_ext': build_ext,
'bdist_egg': bdist_egg,
},
classifiers=[
'License :: Public Domain',
'License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication'
]
)