-
Notifications
You must be signed in to change notification settings - Fork 454
/
Copy pathpyproject.toml
99 lines (86 loc) · 2.58 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
[project]
name = "p4c"
requires-python = ">=3.8"
[flake8]
max-line-length = 100
max-complexity = 10
extend-ignore = "E203"
[tool.isort]
profile = 'black'
line_length = 100
[tool.black]
line-length = 100
skip-string-normalization = true
[tool.mypy]
namespace_packages = true
disallow_untyped_defs = true
show_error_codes = true
no_implicit_optional = true
warn_return_any = true
warn_unused_ignores = true
[tool.ruff]
# Same as Black.
line-length = 100
indent-width = 4
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E4", "E7", "E9", "F"]
ignore = []
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.pylint.main]
init-hook="from pylint.config import find_default_config_files; import os, sys, pathlib; sys.path.append(next(find_default_config_files()).parent);sys.path.append(f'{pathlib.Path().home()}.local/lib/python{sys.version_info[0]}.{sys.version_info[1]}/site-packages/');"
[tool.pylint.messages_control]
max-line-length = 100
disable = [
"missing-docstring",
"missing-function-docstring",
"too-few-public-methods",
]
[tool.poetry]
name = "p4c"
version = "1.2.5.1"
description = ""
authors = ["Your Name <[email protected]>"]
license = "Apache"
readme = "README.md"
package-mode = false
[tool.poetry.dependencies]
# Fixme: This restriction is because of pyinstaller
python = "<3.14,>=3.8"
# General testing utilties.
pyroute2 = "0.7.3"
ply = "3.11"
scapy = "2.5.0"
# Utilities for BMv2 and PTF tests.
ptf = "0.10.0"
googleapis-common-protos = "1.53.0"
grpcio = [
{version = "1.67.0", python = ">3.6"},
{version = "1.48.2", python = "<=3.6"}
]
thrift = "0.21.0 "
protobuf = [
{version = "3.20.2", python = ">3.6"},
{version = "3.19.2", python = "<=3.6"}
]
# Linters and formatters.
clang-format = "18.1.0"
black = [
{version = "24.3.0", python = ">3.6"},
{version = "22.8.0", python = "<=3.6"}
]
isort = [
{version = "5.13.2", python = ">3.6"},
{version = "5.10.1", python = "<=3.6"}
]
# FIXME: We should figure out a way to synchronize P4Runtime versions across CMake and Poetry. This is the same commit hash as defined in the top-level CMakelists.txt
p4runtime = { git = "https://github.com/p4lang/p4runtime.git", rev = "ec4eb5ef70dbcbcbf2f8357a4b2b8c2f218845a5", subdirectory = "py"}
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"