This repository has been archived by the owner on Mar 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
setup.py
executable file
·118 lines (106 loc) · 3.98 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Created based on: https://github.com/kennethreitz/setup.py/blob/master/setup.py
# Alternative: https://github.com/seanfisk/python-project-template/blob/master/setup.py.tpl
# https://github.com/pypa/sampleproject/blob/master/setup.py
# https://blog.ionelmc.ro/2014/05/25/python-packaging
from __future__ import absolute_import, print_function
import os
import re
from glob import glob
from os.path import basename, splitext
from setuptools import find_packages, setup # type: ignore
# Package meta-data
NAME = "lazycluster"
MAIN_PACKAGE = NAME # Change if main package != NAME
DESCRIPTION = "Distributed machine learning made simple."
URL = "https://github.com/ml-tooling/lazycluster.git"
EMAIL = "[email protected]"
AUTHOR = "ML Tooling Team"
LICENSE = "Apache License 2.0"
REQUIRES_PYTHON = ">=3.6"
VERSION = None # Only set version if you like to overwrite the version in src/_about.py
PWD = os.path.abspath(os.path.dirname(__file__))
# Import the README and use it as the long-description.
with open(os.path.join(PWD, "README.md"), encoding="utf-8") as f:
long_description = f.read()
# Extract the version from the _about.py module.
if not VERSION:
with open(os.path.join(PWD, "src", MAIN_PACKAGE, "_about.py")) as f: # type: ignore
VERSION = re.findall(r"__version__\s*=\s*\"(.+)\"", f.read())[0]
# Where the magic happens:
setup(
name=NAME,
version=VERSION,
description=DESCRIPTION,
long_description=long_description,
long_description_content_type="text/markdown",
author=AUTHOR,
author_email=EMAIL,
python_requires=REQUIRES_PYTHON,
url=URL,
license=LICENSE,
packages=find_packages(where="src", exclude=("tests", "test", "docs", "examples")),
package_dir={"": "src"},
py_modules=[splitext(basename(path))[0] for path in glob("src/*.py")],
include_package_data=True,
zip_safe=False,
install_requires=["fabric", "stormssh", "cloudpickle", "psutil", "click-spinner"],
extras_require={
# TODO: Add all extras (e.g. for build and test) here:
# extras can be installed via: pip install package[dev]
"dev": [
"setuptools",
"wheel",
"twine",
"flake8",
"pytest",
"pytest-mock",
"mypy",
"pytest-cov",
"black",
"pydocstyle",
"isort",
"lazydocs",
"distributed", # Dask distributed
"hyperopt",
"docker",
],
},
classifiers=[
# TODO: Update based on https://pypi.python.org/pypi?%3Aaction=list_classifiers
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
package_data={
# If there are data files included in your packages that need to be
# 'sample': ['package_data.dat'],
},
project_urls={
"Changelog": URL + "/releases",
"Issue Tracker": URL + "/issues",
"Documentation": URL + "#documentation",
"Source": URL,
},
entry_points={
# 'console_scripts': ['cli-command=my_package.cli_handler:cli'],
},
keywords=[
# eg: 'keyword1', 'keyword2', 'keyword3',
],
)