Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
151 lines (140 loc) · 4.49 KB
/
Copy pathpyproject.toml
File metadata and controls
151 lines (140 loc) · 4.49 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
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
[project]
name = "guppyft"
version = "0.5.1"
description = "Tools for fault-tolerant quantum computing in the Guppy language"
requires-python = ">=3.12,<4"
readme = "package.md"
license = { file = "LICENCE" }
authors = [
{ name = "TKET development team", email = "tket-support@quantinuum.com" },
]
maintainers = [
{ name = "TKET development team", email = "tket-support@quantinuum.com" },
]
classifiers = [
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
]
dependencies = [
"guppylang>=1.2.0",
"guppylang-internals>=1.2.0",
"hugr>=0.18.6",
"tket>=0.15.8",
"tket-exts>=0.14.0",
"zixy~=0.4.0",
"selene-sim>=0.3.0,!=0.3.5",
]
[project.urls]
homepage = "https://docs.quantinuum.com/guppy/ft/"
repository = "https://github.com/quantinuum/guppyft"
[dependency-groups]
dev = [
"maturin>=1.15.0,<2",
{ include-group = "examples" },
{ include-group = "lint" },
{ include-group = "test" },
]
docs = [
{ include-group = "examples" },
"myst-nb>=1.4.0",
"quantinuum-sphinx>=1.12.0",
"sphinx>=9.1.0",
"sphinx-tabs>=3.5.0",
"sphinx-copybutton>=0.5.2",
]
examples = [
"ipykernel>=7.3.0",
]
lint = [
"pre-commit>=4.6.2,<5",
"ruff>=0.16.6",
"mypy>=2.4.0",
]
test = [
"pytest>=9.1.0",
"pytest-snapshot>=0.9.0",
"pytest-xdist>=3.8.0",
]
[tool.mypy]
strict = true
allow_redefinition = true
exclude = ["tests/error"]
[build-system]
requires = ["maturin>=1.15.0,<2.0"]
build-backend = "maturin"
[tool.maturin]
module-name = "guppyft._bindings"
python-source = "src/"
manifest-path = "rust/Cargo.toml"
features = ["py"] # skips linking against libpython.so
profile = "dev-py" # See root Cargo.toml
[tool.cibuildwheel]
build = "cp312-*"
build-frontend = "build[uv]"
skip = "*-win32 *-manylinux_i686 *-musllinux*"
manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64"
manylinux-aarch64-image = "quay.io/pypa/manylinux_2_28_aarch64"
[tool.cibuildwheel.linux]
config-settings = { "build-args" = ["--compatibility", "manylinux_2_28", "--profile=release-py"] }
before-all = [
"curl -sSf https://sh.rustup.rs | sh -s -- -y",
"dnf install -y --setopt=install_weak_deps=False libffi-devel",
]
repair-wheel-command = [
# maturin 1.13+ handles wheel repair in the backend build step, so only audit here
'cp {wheel} {dest_dir}',
'uvx abi3audit --strict --report {wheel}',
]
test-command = [
"python -c 'from guppyft._bindings import RsHugr'", # Bindings are essential
]
[tool.cibuildwheel.linux.environment]
# we prepend /host to incoming paths because cibuildwheel mounts the host filesystem at /host.
# this can ONLY be done if you know for sure that the libraries available at that directory on
# the host are compatible with the build environment, e.g. manylinux compliant.
PATH = '$HOME/.cargo/bin:$PATH'
CARGO_INCREMENTAL = '0'
CARGO_NET_GIT_FETCH_WITH_CLI = 'true'
CARGO_PROFILE_RELEASE_DEBUG = 'false'
[tool.cibuildwheel.macos]
before-all = 'curl -sSf https://sh.rustup.rs | sh -s -- -y'
config-settings = { "build-args" = ["--profile=release-py"] }
repair-wheel-command = [
# maturin 1.13+ handles wheel repair in the backend build step, so only audit here
'cp {wheel} {dest_dir}',
'uvx abi3audit --strict --report {wheel}',
]
test-command = [
"python -c 'from guppyft._bindings import RsHugr'", # Bindings are essential
]
[tool.cibuildwheel.macos.environment]
PATH = '$HOME/.cargo/bin:$PATH'
MACOSX_DEPLOYMENT_TARGET = "13.2"
CARGO_INCREMENTAL = '0'
CARGO_NET_GIT_FETCH_WITH_CLI = 'true'
CARGO_PROFILE_RELEASE_DEBUG = 'false'
[tool.cibuildwheel.windows]
before-all = 'rustup update'
config-settings = { "build-args" = ["--profile=release-py"] }
repair-wheel-command = [
# maturin 1.13+ handles wheel repair in the backend build step, so only audit here
'copy {wheel} {dest_dir}',
'uvx abi3audit --strict --report {wheel}',
]
test-command = [
'cd /d {project}',
'''python -c "from guppyft._bindings import RsHugr"''', # Bindings are essential
]
[tool.cibuildwheel.windows.environment]
CARGO_INCREMENTAL = '0'
CARGO_NET_GIT_FETCH_WITH_CLI = 'true'
CARGO_PROFILE_RELEASE_DEBUG = 'false'