-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
121 lines (99 loc) · 3.54 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import sys
import os
from setuptools import setup
from setuptools.command.develop import develop
PYPY = hasattr(sys, 'pypy_version_info')
requires = [
'SQLAlchemy>=1.0',
'flask>=0.10, <1.0',
'alembic>=0.8.0',
'Flask-SQLAlchemy>=2.0',
'Flask-Script>=2.0',
'Flask-Migrate>=1.5.0',
'Flask-Login>=0.3.0',
'Flask-WTF>=0.12',
'voluptuous>=0.8',
'stevedore>=1.7',
'flask-cors>=2.1',
'simplejson>=3.8',
'misaka>=2.0.0',
]
if PYPY:
requires += ['psycopg2cffi>=2.7']
else:
requires += ['psycopg2>=2.6']
def get_data_files_list(paths):
data_files = []
for path in paths:
for root, dirnames, filenames in os.walk(path):
if not root.endswith('__pycache__'):
full_filenames = [
os.path.join(root, f) for f in filenames
if not f.endswith('.pyc')]
data_files.append([root, full_filenames])
return data_files
class DevelopDocs(develop):
"""Custom command to require docs dependencies."""
def __init__(self, *args, **kwargs):
global requires
requires += ['sphinx>=1.3.1']
develop.__init__(self, *args, **kwargs)
class DevelopTests(develop):
"""Custom command to require test dependencies."""
def __init__(self, *args, **kwargs):
global requires
requires += [
'pytest>=2.8.0',
'pytest-cov>=2.1.0',
]
develop.__init__(self, *args, **kwargs)
setup(
name='pg-discuss',
version='1.0b1',
description='A comment system backend on top of PostgreSQL',
license='MIT',
author='Steffen Prince',
author_email='[email protected]',
url='https://pg-discuss.sprin.io',
download_url='https://github.com/sprin/pg-discuss',
classifiers=['Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Intended Audience :: Developers',
'Environment :: Web Environment',
'Framework :: Flask',
],
platforms=['Any'],
provides=['pg_discuss'],
packages=['pg_discuss', 'pg_discuss.drivers'],
include_package_data=True,
package_data={'pg_discuss': ['*.html', '*.js', '*.svg']},
data_files=(
get_data_files_list(['isso', 'migrations', 'ext_migrations',
'blessed_extensions'])
+ [['', ['uwsgi.ini', 'main.py']]]),
# Entrypoints for drivers included in core. We need to include basic
# drivers in core so that the app is functional without the
# `blessed_extensions` package or additional driver packages.
entry_points={
'pg_discuss.ext': [
'core_escaping_renderer = pg_discuss.drivers.escaping_renderer:EscapingRenderer',
'core_null_identity_policy = pg_discuss.drivers.null_identity_policy:NullIdentityPolicy',
'core_iso_date_json_encoder = pg_discuss.drivers.iso_date_json_encoder:IsoDateJSONEncoder',
],
'console_scripts': [
'pgd-admin = pg_discuss.management:execute_from_command_line',
],
},
zip_safe=False,
install_requires=requires,
cmdclass={
'develop_docs': DevelopDocs,
'develop_tests': DevelopTests,
},
)