Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
120 lines (108 loc) · 3.13 KB
/
Copy pathpyproject.toml
File metadata and controls
120 lines (108 loc) · 3.13 KB
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
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "heir_py"
version = "0.0.3"
authors = [
{ name = "Jeremy Kun", email = "jkun@google.com" },
{ name = "Asra Ali", email = "asraa@google.com" },
{ name = "Alexander Viand", email = "alexander.viand@intel.com" },
]
description = "The HEIR compiler"
readme = "README.md"
requires-python = ">=3.11"
classifiers = [
"Topic :: Security :: Cryptography",
"Intended Audience :: Developers",
"Topic :: Software Development :: Compilers",
]
license = "MIT AND Apache-2.0"
dependencies = [
"numba~=0.62.0",
# Numpy versioning is a bit tricky:
# Numba 0.62 supports >=1.22,<=2.3,
# but SciPy 1.14 wants >=1.23.5,<2.3.0" and will warn at runtime if not satisfied,
# and finally we actually need <2 because otherwise we get "OverflowError: Python integer -1 out of bounds for uint32"
# in some of our tests as Numpy 2 introduces stricter type checking
"numpy>=1.23.5,<2",
"pybind11>=2.13.6",
"pybind11_global>=2.13.6",
"colorama>=0.4.6",
"absl-py>=2.1.0",
]
[project.optional-dependencies]
dev = [
# for tests/poly/runner/generate_test_cases.py
"tomli>=2.0.1",
"sympy>=1.12",
"mpmath>=1.3.0",
# Requirements for running jaxite backend examples
"jaxite==0.0.2",
# for scripts and repo utils
"fire>=0.7.0",
"jinja2>=3.1.5",
"pre-commit>=v3.3.3",
"pytest>=8.1.1",
"requests>=2.0.0",
# Python Formatting
"pyink>=24.10.1",
# For ML integration tests
"torch>=2.8.0",
"setuptools>=80.9.0",
]
[project.urls]
Homepage = "https://heir.dev"
Issues = "https://github.com/google/heir/issues"
[tool.setuptools]
package-dir = { "" = "frontend" }
zip-safe = false
[tool.setuptools.packages.find]
where = ["frontend"]
[tool.cibuildwheel]
build = "cp311-* cp312-* cp313-*"
build-frontend = "build[uv]"
skip = "*-musllinux_* pp-*"
# The test must be run in an isolated directory so that python uses the wheel
# when running `import heir` instead of the local source files. cibuildwheel
# creates an isolated directory for this purpose, and cd's to it before running
# this command.
test-command = "cp {package}/frontend/example.py . && python example.py"
[tool.cibuildwheel.linux]
archs = "auto64"
before-all = "bash .github/install_cibuildwheel_deps.sh"
# Use the rootless Bazel installation inside the container.
environment = { PATH = "$PATH:$HOME/bin" }
[tool.cibuildwheel.windows]
archs = "auto64"
[tool.cibuildwheel.macos]
# Inherits archs from default (auto64)
# Unused by Bazel, but needed explicitly by delocate on MacOS.
environment = { MACOSX_DEPLOYMENT_TARGET = "10.14" }
[tool.pytest.ini_options]
norecursedirs = [
".git",
"__pycache__",
"bazel",
"bazel-bin",
"bazel-heir",
"bazel-out",
"bazel-testlogs",
"docs",
"external",
"tests",
"tools",
"venv",
]
[tool.pyink]
line-length = 80
unstable = true
pyink-indentation = 2
pyink-use-majority-quotes = true
[tool.codespell]
# words to allow even though codespell thinks they're misspelled
ignore-words-list = "crate,fpt,LogArithmetic,olt,allOne"
# enable if you want the pre-commit hook to automatically write changes
write-changes = false
# files to exclude
skip = "*.lock"