forked from llonchj/django-tastypie-elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·48 lines (43 loc) · 1.67 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
#!/usr/bin/env python
import os
import re
from setuptools import setup, find_packages
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.settings")
def parse_requirements(file_name):
requirements = []
for line in open(file_name, 'r').read().split('\n'):
if re.match(r'(\s*#)|(\s*$)', line):
continue
if re.match(r'\s*-e\s+', line):
# TODO support version numbers
requirements.append(re.sub(r'\s*-e\s+.*#egg=(.*)$', r'\1', line))
elif re.match(r'\s*-f\s+', line):
pass
else:
requirements.append(line)
return requirements
setup(
name = 'django-tastypie-elasticsearch',
version = '0.5.1',
description = "ElasticSearch Resource for django-tastypie.",
long_description = open(os.path.join(os.path.dirname(__file__), 'README.md')).read(),
author = 'Jordi Llonch',
author_email = '[email protected]',
url = 'https://github.com/llonchj/django-tastypie-elasticsearch',
keywords = "REST RESTful tastypie elasticsearch django",
license = 'AGPLv3',
packages = find_packages(exclude=('*.tests', '*.tests.*', 'tests.*', 'tests')),
classifiers = (
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU Affero General Public License v3',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Framework :: Django',
),
zip_safe = True,
install_requires=parse_requirements('requirements.txt'),
tests_require=parse_requirements('requirements-test.txt'),
test_suite='tests.runtests.runtests',
)