-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathpyproject.toml
200 lines (176 loc) · 5.79 KB
/
pyproject.toml
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
[project]
name = "qihoo-tensornet"
version = "0.102.0.dev"
description = "a TensorFlow-based distributed training framework optimized for large-scale sparse data"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.5"
authors = [
{ name = "jiangxinglei", email = "[email protected]" },
{ name = "gaozhiming", email = "[email protected]" },
]
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
]
dependencies = [
# use tensorflow from pypi, with cxx11 abi = 0
"tensorflow-cpu >=2.2,<2.3",
]
[project.urls]
homepage = "https://github.com/Qihoo360/tensornet"
issues = "https://github.com/Qihoo360/tensornet/issues"
releasenotes = "https://github.com/Qihoo360/tensornet/releases"
[build-system]
requires = ["setuptools>=61.0.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
platforms = ["manylinux2010_x86_64"]
[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = ["linux-64", "osx-arm64"]
requires-pixi = ">=0.44"
[tool.pixi.activation]
scripts = [".pixi/rc.sh"]
[tool.pixi.pypi-options]
no-build = true # required no-build for selecting grpcio<1.47 and h5py<3.8 on CentOS 6
[tool.pixi.system-requirements]
linux = "2.6" # at least centos 6
libc = { family = "glibc", version = "2.12" } # at least centos 6
[tool.pixi.feature.centos7.system-requirements]
linux = "3.10" # at least centos 7
libc = { family = "glibc", version = "2.17" } # at least centos 7
[tool.pixi.feature.build]
platforms = ["linux-64"]
[tool.pixi.feature.build.dependencies]
# build toolchains
cmake = ">=3.29"
gxx = "*"
sysroot_linux-64 = "<2.13" # for running on CentOS 6
patch = "*"
protobuf = ">=3.8,<3.9" # tf 2.2 use pb 3.8
# build dependencies
gflags = { version = "*", build = "*_0" } # brpc static dep, build with cxx_abi=0
leveldb = { version = "<1.20", build = "*_1" } # brpc static dep, build with cxx_abi=0
boost = "*"
# build and runtime dependencies
nomkl = "*"
openmpi = ">=3,<5"
numpy = "<1.19.0" # required by tensorflow 2.2.3
# test-only dependencies
gtest = { version = "<1.10", build = "*_0" } # build with cxx_abi=0
# python package tools
twine = "*" # check and upload pypi package
python-build = "*"
make = ">=4.3,<5"
[tool.pixi.feature.build.tasks]
configure = "cmake --preset default -S ."
build = "./cmake-build"
ut = "./cmake-build --preset default -t test"
ut-only = "cmake-build --test"
workflow = "cmake --workflow --preset default"
create-wheel = "python3 -m build -w -n"
create-tools-wheel = { cmd = "python3 -m build -w -n", cwd = "tensornet_tools" }
bazel-build = "NEED_ACTIVATE_ENV=false \"$PIXI_PROJECT_ROOT\"/manager build --subcommands --verbose_failures"
copy-libs = "NEED_ACTIVATE_ENV=false \"$PIXI_PROJECT_ROOT\"/manager copy-libs"
dist = "NEED_ACTIVATE_ENV=false \"$PIXI_PROJECT_ROOT\"/manager create_dist"
[tool.pixi.feature.py37]
platforms = ["linux-64"]
dependencies = { python = ">=3.7,<3.8" } # to build wrapper for py37
[tool.pixi.feature.py36]
platforms = ["linux-64"]
dependencies = { python = ">=3.6,<3.7" } # to build wrapper for py36
[tool.pixi.feature.py35]
platforms = ["linux-64"]
dependencies = { python = ">=3.5,<3.6a1" } # to build wrapper for py35
[tool.pixi.feature.tools]
platforms = ["linux-64", "osx-arm64"]
[tool.pixi.feature.tools.dependencies]
actionlint = "*"
bump-my-version = "*"
check-wheel-contents = "*"
clang-format = "*"
cmakelang = '*'
go-shfmt = "*"
pre-commit = "*"
pre-commit-hooks = "*"
ruff = "*"
shellcheck = '*'
taplo = "*"
typos = "*"
yamlfmt = "*"
[tool.pixi.feature.tools.tasks]
bump-release = "./manager release"
bump-version = "./manager bump-version"
pre-commit-install = "pre-commit install --install-hooks -t=pre-commit"
pre-commit-run = "pre-commit run --all-files"
ruff-format = "ruff format --force-exclude"
ruff-lint = "ruff check --fix --exit-non-zero-on-fix --force-exclude"
shell-format = "shfmt --write --indent=2 --simplify --binary-next-line"
toml-format = { cmd = "taplo fmt", env = { RUST_LOG = "warn" } }
[tool.pixi.environments]
default = { features = ["build"] }
py37 = { features = [
"py37",
"centos7",
], solve-group = "py37", no-default-feature = true }
py36 = { features = [
"py36",
"centos7",
], solve-group = "py36", no-default-feature = true }
py35 = { features = [
"py35",
"centos7",
], solve-group = "py35", no-default-feature = true }
tools = { features = [
"tools",
"centos7",
], solve-group = "tools", no-default-feature = true }
[tool.bumpversion]
commit = false
tag = false
parse = """(?x)
(?P<major>0|[1-9]\\d*)\\.
(?P<minor>0|[1-9]\\d*)\\.
(?P<patch>0|[1-9]\\d*)
(?:
\\.
(?: post | (?P<release>[a-z]+) )
(?P<build>[1-9]\\d*)?
)?
"""
serialize = [
"{major}.{minor}.{patch}.{release}{build}",
"{major}.{minor}.{patch}.{release}",
"{major}.{minor}.{patch}.post{build}",
"{major}.{minor}.{patch}",
]
[tool.bumpversion.parts.release]
values = ["dev", "rc", "prod"]
optional_value = "prod"
[[tool.bumpversion.files]]
filename = "tensornet/version.py"
[[tool.bumpversion.files]]
filename = "tensornet_tools/pyproject.toml"
[tool.ruff]
line-length = 120
target-version = "py38"
exclude = ["doc/tutorial/", "tensornet/core/gen_*_ops.py"]
[tool.ruff.format]
indent-style = "space"
quote-style = "double"
[tool.typos.default]
extend-ignore-re = [
# https://github.com/github/gitignore/pull/4420
"# IntelliJ project files and plugin configuration\\. Seperate directories are",
]
[tool.typos.default.extend-identifiers]
gather_nd = "gather_nd"
[tool.typos.default.extend-words]
mape = "mape"