-
Notifications
You must be signed in to change notification settings - Fork 8
/
setup.py
96 lines (89 loc) · 3.1 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import os
from setuptools import setup, find_packages
EXTRAS_REQUIRE = {
"tests": ["pytest", "mock", "pytest-django==3.10.0", "factory-boy==2.11.1"],
"lint": [
"flake8==5.0.4",
'flake8-bugbear==18.8.0; python_version >= "3.5"',
"pre-commit==2.17.0",
],
}
EXTRAS_REQUIRE["dev"] = (
EXTRAS_REQUIRE["tests"] + EXTRAS_REQUIRE["lint"] + ["konch>=3.0.0", "tox"]
)
def find_version(fname):
"""Attempts to find the version number in the file names fname.
Raises RuntimeError if not found.
"""
version = ""
with open(fname, "r") as fp:
reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
for line in fp:
m = reg.match(line)
if m:
version = m.group(1)
break
if not version:
raise RuntimeError("Cannot find version information")
return version
def read(fname):
with open(fname) as fp:
content = fp.read()
return content
setup(
name="django-elasticsearch-metrics",
version=find_version(os.path.join("elasticsearch_metrics", "__init__.py")),
author="Steven Loria, Dawn Pattison",
author_email="[email protected], [email protected]",
description="Django app for storing time-series metrics in Elasticsearch.",
long_description=read("README.md"),
long_description_content_type="text/markdown",
url="http://github.com/CenterForOpenScience/django-elasticsearch-metrics",
license="MIT",
packages=find_packages(exclude=("tests",)),
keywords=(
"django",
"elastic",
"elasticsearch",
"elasticsearch-dsl",
"time-series",
"metrics",
"statistics",
),
install_requires=["elasticsearch-dsl>=6.3.0,<7.0.0"],
extras_require=EXTRAS_REQUIRE,
classifiers=[
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Framework :: Django",
"Framework :: Django :: 1.11",
"Framework :: Django :: 2.0",
"Framework :: Django :: 2.1",
"Framework :: Django :: 2.2",
"Framework :: Django :: 3.0",
"Framework :: Django :: 3.1",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries :: Python Modules",
],
zip_safe=False,
include_package_data=True,
project_urls={
"Issues": "https://github.com/CenterForOpenScience/django-elasticsearch-metrics/issues",
"Changelog": "https://github.com/CenterForOpenScience/django-elasticsearch-metrics/blob/master/CHANGELOG.md",
},
)