-
Notifications
You must be signed in to change notification settings - Fork 118
/
setup.py
218 lines (210 loc) · 7.74 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
import os
from setuptools import find_packages, setup
version = '0.22.5'
DOCS_TRANSFORMATIONS = (
(
':doc:`Dynamic serializer for Documents <basic_usage_examples>`',
'`Dynamic serializer for Documents <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'basic_usage_examples.html#sample-serializer'
'>`_'.format(version)
),
(
':doc:`Search filter backend <advanced_usage_examples>`',
'`Search filter backend <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'advanced_usage_examples.html#search'
'>`_'.format(version)
),
(
':doc:`Ordering filter backend <advanced_usage_examples>`',
'`Ordering filter backend <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'advanced_usage_examples.html#ordering'
'>`_'.format(version)
),
(
':doc:`Filtering filter backend <advanced_usage_examples>`',
'`Filtering filter backend <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'advanced_usage_examples.html#filtering'
'>`_'.format(version)
),
(
':doc:`Geo-spatial filtering filter backend <advanced_usage_examples>`',
'`Geo-spatial filtering filter backend <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'advanced_usage_examples.html#geo-spatial-features'
'>`_'.format(version)
),
(
':doc:`Geo-spatial ordering filter backend <advanced_usage_examples>`',
'`Geo-spatial ordering filter backend <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'advanced_usage_examples.html#geo-spatial-features'
'>`_'.format(version)
),
(
':doc:`Faceted search filter backend <advanced_usage_examples>`',
'`Faceted search filter backend <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'advanced_usage_examples.html#faceted-search'
'>`_'.format(version)
),
(
':doc:`Post-filter filter backend <advanced_usage_examples>`',
'`Post-filter filter backend <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'advanced_usage_examples.html#post-filter'
'>`_'.format(version)
),
(
':doc:`Nested filtering filter backend <nested_fields_usage_examples>`',
'`Nested filtering filter backend <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'nested_fields_usage_examples.html#nested-filtering'
'>`_'.format(version)
),
(
':doc:`Highlight backend <advanced_usage_examples>`',
'`Highlight backend <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'advanced_usage_examples.html#highlighting'
'>`_'.format(version)
),
(
':doc:`Pagination (Page number and limit/offset pagination) '
'<advanced_usage_examples>`',
'`Pagination (Page number and limit/offset pagination) <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'advanced_usage_examples.html#pagination'
'>`_'.format(version)
),
(
':doc:`quick start tutorial <quick_start>`',
'`quick start tutorial <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'quick_start.html'
'>`_'.format(version)
),
(
':doc:`Suggester filter backend <advanced_usage_examples>`',
'`Suggester filter backend <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'advanced_usage_examples.html#suggestions'
'>`_'.format(version)
),
(
':doc:`Functional suggester filter backend <advanced_usage_examples>`',
'`Functional suggester filter backend <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'advanced_usage_examples.html#functional-suggestions'
'>`_'.format(version)
),
(
':doc:`Ids filter backend <advanced_usage_examples>`',
'`Ids filter backend <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'advanced_usage_examples.html#ids-filter'
'>`_'.format(version)
),
(
':doc:`Multi match search filter backend <search_backends>`',
'`Multi match search filter backend <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'search_backends.html#multi-match-search-filter-backend'
'>`_'.format(version)
),
(
':doc:`Simple search query search filter backend <search_backends>`',
'`Simple search query filter backend <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'search_backends.html#simple-query-string-filter-backend'
'>`_'.format(version)
),
(
':doc:`More-like-this support (detail action) <more_like_this>`',
'`More-like-this support (detail action) <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'more_like_this.html'
'>`_'.format(version)
),
(
':doc:`Global aggregations support <global_aggregations>`',
'`Global aggregations support <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'global_aggregations.html'
'>`_'.format(version)
),
(
':doc:`Source filter backend <source_backend>`',
'`Source filter backend <'
'http://django-elasticsearch-dsl-drf.readthedocs.io/en/{}/'
'source_backend.html'
'>`_'.format(version)
),
)
try:
readme = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
for __search, __replace in DOCS_TRANSFORMATIONS:
readme = readme.replace(__search, __replace)
except:
readme = ''
install_requires = [
'six>=1.9',
'django-nine>=0.2',
'django-elasticsearch-dsl>=6.4.1',
'elasticsearch-dsl',
'elasticsearch',
'djangorestframework',
]
extras_require = []
tests_require = [
'factory_boy',
'Faker',
'pytest',
'pytest-django',
'pytest-cov',
'tox',
'mock',
]
setup(
name='django-elasticsearch-dsl-drf',
version=version,
description="Integrate Elasticsearch DSL with Django REST framework.",
long_description=readme,
classifiers=[
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Environment :: Web Environment",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
"License :: OSI Approved :: GNU Lesser General Public License v2 or "
"later (LGPLv2+)",
"Framework :: Django",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
],
project_urls={
"Bug Tracker": "https://github.com/barseghyanartur/"
"django-elasticsearch-dsl-drf/issues",
"Documentation": "https://django-elasticsearch-dsl-drf.readthedocs.io/",
"Source Code": "https://github.com/barseghyanartur/"
"django-elasticsearch-dsl-drf",
"Changelog": "https://django-elasticsearch-dsl-drf.readthedocs.io/"
"en/latest/changelog.html",
},
keywords="django, elasticsearch, elasticsearch-dsl, django rest framework",
author='Artur Barseghyan',
author_email='artur.barseghyan@gmail.com',
url='https://github.com/barseghyanartur/django-elasticsearch-dsl-drf/',
package_dir={'': 'src'},
packages=find_packages(where='./src'),
license='GPL-2.0-only OR LGPL-2.1-or-later',
python_requires=">=2.7",
install_requires=(install_requires + extras_require),
tests_require=tests_require,
include_package_data=True,
)