/
setup.py
executable file
·62 lines (52 loc) · 1.9 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
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.sdist import sdist as base_sdist
from wagtailclearstream 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 sdist(base_sdist):
def run(self):
self.compile_assets()
base_sdist.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='wagtailclearstream',
version=__version__,
description='Improvement to StreamField UI by extending StreamBlock.',
long_description='This gives support to StreamField UI by allowing neater '
'nesting of StreamField blocks, allowing StreamField blocks to be opened '
'or collapsed, and ensuring that a user confirms the deletion of a '
'StreamField block before it is deleted.',
url='https://github.com/heymonkeyriot/wagtailclearstream',
author='Edd Baldry',
author_email='edd.baldry@gmail.com',
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.7.0",
"Django>=1.7.1",
],
cmdclass={'sdist': sdist},
)