This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
70 lines (58 loc) · 1.68 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
# coding: utf-8
import os
import re
from setuptools import setup, find_packages # noqa: H301
NAME = "bitdotio"
VERSIONFILE = os.path.join(NAME, "_version.py")
RE_VERSION = re.compile(r'^__version__ = "(?P<version>.+?)"$')
def get_version():
with open(VERSIONFILE, "r") as f:
match = RE_VERSION.match(f.read().strip())
if match:
return match.group("version")
raise ValueError("Unable to parse version file")
# To install the library, run the following
#
# python setup.py install
#
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
REQUIRES = ["requests >= 2.28.1", "click >= 8.0.1"]
EXTRAS = {
"psycopg2": [
"psycopg2>=2.8.6",
],
"psycopg2-binary": [
"psycopg2-binary>=2.8.6",
],
}
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name=NAME,
version=get_version(),
description="bit.io Python SDK and CLI",
author="bit.io",
author_email="[email protected]",
url="https://github.com/bitdotioinc/python-bitdotio",
keywords=["bit.io", "Database", "bit.io Python SDK"],
install_requires=REQUIRES,
extras_require=EXTRAS,
packages=find_packages(exclude=["test", "tests"]),
include_package_data=True,
long_description=long_description,
long_description_content_type="text/markdown",
project_urls={
"Bug Tracker": "https://github.com/bitdotioinc/python-bitdotio/issues",
},
classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
],
python_requires=">=3.7",
entry_points={
"console_scripts": [
"bit = bit.bit:main",
]
},
)