-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
90 lines (77 loc) · 1.95 KB
/
setup.py
File metadata and controls
90 lines (77 loc) · 1.95 KB
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
:license: GPLv3, see LICENSE for more details.
"""
import os
import sys
import setuptools
from MambuPy import __version__
def readme():
"""print long description"""
try:
import m2r2
except ImportError:
with open("README.md") as f:
return f.read()
with open("README.md") as f:
return m2r2.convert(f.read())
class VerifyVersionCommand:
"""Custom command to verify that the git tag matches our version"""
description = "verify that the git tag matches our version"
def run(self):
tag = os.getenv("CIRCLE_TAG")
if tag != __version__:
info = "Git tag: {0} does not match the version of this app: {1}".format(
tag, __version__
)
sys.exit(info)
packages=[
"MambuPy",
"MambuPy/rest",
"MambuPy/orm",
"mambupy",
"mambupy/rest",
"mambupy/orm",
]
if int(__version__[0]) >= 2:
packages.extend(
["MambuPy/api",
"mambupy/api",
"MambuPy/api/connector",
"mambupy/api/connector",
"MambuPy/rest1to2",
"mambupy/rest1to2",
])
install_requires=[
"future",
"requests==2.31.0",
"requests_toolbelt==0.9.1",
"SQLAlchemy>=1.3.6",
]
if int(__version__[0]) <= 3:
install_requires.extend(
["mysqlclient",
])
else:
install_requires.extend(
["mysqlclient==2.1.0",
])
setuptools.setup(
name="MambuPy",
version=__version__,
description="A python lib for using Mambu APIs.",
long_description=readme(),
long_description_content_type="text/markdown",
url="https://mambupydocs.readthedocs.io",
author="Javier Novoa C.",
author_email="jstitch@gmail.com",
license="GPLv3",
keywords=[
"mambu",
],
packages=packages,
python_requires=">=2.7",
cmdclass={"verify": VerifyVersionCommand},
install_requires=install_requires,
)