-
Notifications
You must be signed in to change notification settings - Fork 13
/
setup.py
executable file
·72 lines (60 loc) · 2.2 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
import setuptools
import sys
import os
def remove_requirements(requirements, name, replace=None):
new_requirements = []
for requirement in requirements:
if requirement.split(' ')[0] != name:
new_requirements.append(requirement)
elif replace is not None:
new_requirements.append(replace)
return new_requirements
sys_platform = sys.platform
about = {}
with open("mindsdb_datasources/__about__.py") as fp:
exec(fp.read(), about)
long_description = open('README.md', encoding='utf-8').read()
with open('requirements.txt', 'r') as req_file:
requirements = [req.strip() for req in req_file.read().splitlines()]
with open('requirements_test.txt', 'r') as req_file:
test_requirements = [req.strip() for req in req_file.read().splitlines()]
scylla_requirements = []
with open('optional_requirements_scylla.txt', 'r') as fp:
for line in fp:
scylla_requirements.append(line.rstrip('\n'))
cassandra_requirements = []
with open('optional_requirements_cassandra.txt', 'r') as fp:
for line in fp:
cassandra_requirements.append(line.rstrip('\n'))
extra_data_sources_requirements = []
with open('optional_requirements_extra_data_sources.txt', 'r') as fp:
for line in fp:
extra_data_sources_requirements.append(line.rstrip('\n'))
dependency_links = []
setuptools.setup(
name=about['__title__'],
version=about['__version__'],
url=about['__github__'],
download_url=about['__pypi__'],
license=about['__license__'],
author=about['__author__'],
author_email=about['__email__'],
description=about['__description__'],
long_description=long_description,
long_description_content_type="text/markdown",
packages=setuptools.find_packages(),
install_requires=requirements,
extras_require = {
'extra_data_sources': extra_data_sources_requirements,
'scylla': scylla_requirements,
'cassandra': cassandra_requirements
},
tests_require = test_requirements,
dependency_links=dependency_links,
classifiers=(
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
),
python_requires=">=3.6"
)