-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
59 lines (49 loc) · 1.7 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
from __future__ import absolute_import, print_function, unicode_literals
import datetime
import subprocess
from codecs import open
from os import path
from setuptools import find_packages, setup
from setuptools.command.egg_info import egg_info as base_egg_info
from wagtailatomicadmin import __version__
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
class egg_info(base_egg_info):
def run(self):
self.compile_assets()
base_egg_info.run(self)
def compile_assets(self):
try:
subprocess.check_call(['npm', 'run', 'build'])
except (OSError, subprocess.CalledProcessError) as e:
print('Error compiling assets: ' + str(e))
raise SystemExit(1)
setup(
name='wagtailatomicadmin',
version=__version__,
description='An admin UI for Wagtail that encourages nesting StreamField blocks.',
long_description=long_description,
url='https://github.com/alexgleason/wagtailatomicadmin',
author='Alex Gleason',
author_email='[email protected]',
license='MIT',
classifiers=[
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
'Topic :: Internet :: WWW/HTTP',
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
],
keywords=['development'],
packages=find_packages(),
include_package_data=True,
install_requires=[
"wagtail>=1.4.0",
"Django>=1.7.1",
],
cmdclass={'egg_info': egg_info},
)