This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
77 lines (73 loc) · 2.37 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
65
66
67
68
69
70
71
72
73
74
75
76
77
from __future__ import print_function
import os
import setuptools
import shutil
import subprocess
import sys
# Convert README.md to reStructuredText.
if {'bdist_wheel', 'sdist'}.intersection(sys.argv):
try:
import pypandoc
except ImportError:
print('WARNING: You should install `pypandoc` to convert `README.md` '
'to reStructuredText to use as long description.',
file=sys.stderr)
else:
print('Converting `README.md` to reStructuredText to use as long '
'description.')
long_description = pypandoc.convert('README.md', 'rst')
# Clean and install bower components.
if {'bdist_wheel', 'develop', 'sdist'}.intersection(sys.argv):
cwd = os.getcwd()
os.chdir('icekit_events/static/icekit_events')
if os.path.exists('bower_comonents'):
print('Cleaning bower components.')
shutil.rmtree('bower_components')
print('Installing bower components.')
try:
if subprocess.call(['bower', 'install', '--allow-root'], stderr=sys.stderr):
raise RuntimeError
except (OSError, RuntimeError):
print('ERROR: Unable to install bower components.', file=sys.stderr)
if {'bdist_wheel', 'sdist'}.intersection(sys.argv):
exit(1)
os.chdir(cwd)
setuptools.setup(
name='icekit-events',
use_scm_version={'version_scheme': 'post-release'},
author='Interaction Consortium',
author_email='[email protected]',
url='https://github.com/ic-labs/icekit-events',
description='',
long_description=locals().get('long_description', ''),
license='MIT',
packages=setuptools.find_packages(),
include_package_data=True,
install_requires=[
'Django<1.9',
'django-icekit',
'django-polymorphic',
'django-polymorphic-tree',
'django-timezone',
'mkdocs',
'python-dateutil',
'pytz',
'six',
'sqlparse', # Required for SQL migrations, apparently
'django-colorful',
],
extras_require={
'dev': ['ipdb', 'ipython'],
'fluentevent': ['django-fluent-contents'],
'postgres': ['psycopg2'],
'test': [
'coverage',
'django-dynamic-fixture',
'django-nose',
'django-webtest',
'nose-progressive',
'WebTest',
]
},
setup_requires=['setuptools_scm'],
)