-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
72 lines (67 loc) · 2.05 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
from distutils.command.build import build
from os import environ
exec(open("grain/_version.py").read())
class _build(build):
def run(self):
from subprocess import run as cmd
cmd(
"go mod download; "
"CGO_ENABLED=0 GOOS=linux GOARCH=amd64 "
f"go build -ldflags '-s -w -X main.VERSION={__version__}' -trimpath -o ../grain/gnaw",
shell=True, check=True, cwd="gnaw/"
)
build.run(self)
gnaw_build_args = dict(
cmdclass={
'build': _build,
},
data_files=[
('bin', ['grain/gnaw',]),
],
) if not environ.get("CI", False) else {}
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="grain-scheduler",
version=__version__,
author="Harry Zhang",
description="A scheduler for resource-aware parallel computing on clusters.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Contextualist/grain",
packages=setuptools.find_packages(),
python_requires=">=3.9",
install_requires=[
"trio >= 0.22.0",
"dill >= 0.3.2",
"msgpack",
"tomli >= 1.1.0 ; python_version < '3.11'",
"attrs >= 21.3.0",
"cattrs",
"click",
"psutil",
],
tests_require=[
"pytest",
"pytest-trio",
"pytest-benchmark",
],
entry_points={
"console_scripts": ["grain=grain.cli:main"],
},
**gnaw_build_args,
classifiers=[
"Development Status :: 4 - Beta",
"Framework :: Trio",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: System :: Distributed Computing",
],
)