forked from projectcaluma/caluma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
88 lines (75 loc) · 2.45 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
"""Setuptools package definition."""
import distutils.cmd
import os
from os import path
from setuptools import find_packages, setup
version = {}
with open("caluma/caluma_metadata.py") as fp:
exec(fp.read(), version)
here = path.abspath(path.dirname(__file__))
with open(path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()
pipenv_setup = """
echo UID=$(id -u) > .env
echo ENV=dev >> .env
docker-compose up -d db
rm -f Pipfile*
touch Pipfile
pipenv install --python 3.7 -r requirements.txt
pipenv install -d -r requirements-dev.txt
""".strip().splitlines()
class PipenvCommand(distutils.cmd.Command):
description = "setup local development with pipenv"
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
for cmd in pipenv_setup:
assert os.system(cmd) == 0
print(
"\npipenv run pytest runs the tests"
"\npipenv shell enters the virtualenv"
)
setup(
cmdclass={"pipenv": PipenvCommand},
name=version["__title__"],
version=version["__version__"],
description=version["__description__"],
long_description=long_description,
long_description_content_type="text/markdown",
url="https://projectcaluma.github.io/",
download_url="https://github.com/projectcaluma/caluma",
license="License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Programming Language :: Python :: 3.7",
],
packages=find_packages(),
python_requires=">=3.6, <4",
install_requires=[
"dateparser<2",
"django~=2.2",
"django-cors-headers<4",
"django-environ<0.9",
"django-extensions<4",
"django-filter<3",
"django-localized-fields<7",
"django-postgres-extra<3",
"django-watchman<2",
"djangorestframework<4",
"django_simple_history<4",
"graphene-django<=2.8.2",
"idna<3",
"minio >= 7, < 8",
"psycopg2-binary >= 2.8, <2.9",
"pyjexl @ https://github.com/projectcaluma/pyjexl/archive/edd40f4b14b6b14c9915d40d4ad37a540adeec0a.tar.gz",
"python-memcached<2",
"requests<3",
"urllib3<2",
"uwsgi<2.1",
],
)