-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathpyproject.toml
141 lines (128 loc) · 4.19 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
[build-system]
requires = [
"find_libpython>=0.3; sys_platform=='win32'",
"packaging>=23",
"setuptools>=45",
"swig>=4",
]
build-backend = "setuptools.build_meta"
[project]
name = 'vehicle_lang'
authors = [{ name = 'Wen Kokke', email = '[email protected]' }]
description = 'A high-level functional language for writing mathematically-precise specifications for neural networks.'
readme = 'README.md'
license = { file = 'LICENSE' }
dynamic = ["version"]
requires-python = ">=3.9,<3.14"
dependencies = ["typing_extensions >=4.6,<5", "jaxtyping>=0.2, <0.3"]
[project.optional-dependencies]
test = ["pytest >=7.1,<9", "packaging >=23", "pygments >=2.14, <3"]
mypy = ["types_setuptools >=45", "types_pygments >=2.14,<3"]
pygments = ["pygments >=2.14,<3"]
numpy = ["numpy >=1.21,<3"]
jax = ["jax >=0.4.26"]
tensorflow = [
"tensorflow >=2,<3; (python_version>='3.9' and python_version<'3.13') and ((sys_platform=='linux' and (platform_machine=='x86_64' or platform_machine=='aarch64')) or (sys_platform=='darwin' and platform_machine=='x86_64') or (sys_platform=='win32' and platform_machine=='AMD64'))"
]
[project.scripts]
vehicle = "vehicle_lang.__main__:main"
[project.entry-points.'pygments.lexers']
vehicle = "vehicle_lang.pygments:VehicleLexer"
[tool.cibuildwheel]
# 18-04-2023:
# Cross-compilation does not work with GHC and Cabal.
archs = ["native"]
build-frontend = "build"
build = [
# Using a GitHub runner
"*-macosx_x86_64",
# Using a GitHub runner
"*-win_amd64",
# Using wenkokke/manylinux2014_ghc948_x86_64
"*-manylinux_x86_64",
# Using wenkokke/manylinux2014_ghc948_i686
"*-manylinux_i686",
# Using wenkokke/manylinux_2_28_ghc948_aarch64
"*-manylinux_aarch64",
# Using wenkokke/musllinux_1_1_ghc948_x86_64
"*-musllinux_x86_64",
]
skip = [
# 18-04-2023:
# PyPy builds do not work.
"pp*",
]
#test-command = "pytest {package}/tests"
#test-extras = "test"
# 19-06-2023:
# Use custom manylinux and musllinux images with GHC 9.4.8 preinstalled.
manylinux-aarch64-image = "wenkokke/manylinux_2_28_ghc948_aarch64"
manylinux-i686-image = "wenkokke/manylinux2014_ghc948_i686"
manylinux-x86_64-image = "wenkokke/manylinux2014_ghc948_x86_64"
musllinux-x86_64-image = "wenkokke/musllinux_1_1_ghc948_x86_64"
[tool.mypy]
mypy_path = "src"
python_version = "3.9"
strict = true
implicit_reexport = false
ignore_missing_imports = true
exclude = ['^src/vehicle_lang/binding\.py$']
[[tool.mypy.overrides]]
module = "vehicle_lang.pygments"
allow_subclassing_any = true
[[tool.mypy.overrides]]
module = "vehicle_lang.pygments._external"
allow_subclassing_any = true
allow_untyped_defs = true
disable_error_code = ['name-defined']
[tool.pytest.ini_options]
pythonpath = ["src"]
testpaths = ["tests"]
[tool.setuptools.dynamic]
version = { attr = "vehicle_lang._version.VERSION" }
[tool.tox]
legacy_tox_ini = """
[tox]
min_version = 4
env_list = py{39,310,311,312,313}-{lin,mac,win}
[testenv:py{39,310,311,312,313}-{lin,mac,win}]
package = external
package_env = build-{env_name}
platform =
lin: linux
mac: darwin
win: win32
allowlist_externals =
sh
extras =
test
pygments
py39,py310,py311,py312: tensorflow
commands =
{env_python} -m pytest {posargs}
[testenv:build-py{39,310,311,312,313}-{lin,mac,win}]
deps =
build
auditwheel; sys_platform == 'linux'
delocate; sys_platform == 'darwin'
package_glob =
py39-lin: {package_root}{/}dist{/}*cp39*manylinux*.whl
py310-lin: {package_root}{/}dist{/}*cp310*manylinux*.whl
py311-lin: {package_root}{/}dist{/}*cp311*manylinux*.whl
py312-lin: {package_root}{/}dist{/}*cp312*manylinux*.whl
py313-lin: {package_root}{/}dist{/}*cp313*manylinux*.whl
py39-mac: {package_root}{/}dist{/}*cp39*macosx*.whl
py310-mac: {package_root}{/}dist{/}*cp310*macosx*.whl
py311-mac: {package_root}{/}dist{/}*cp311*macosx*.whl
py312-mac: {package_root}{/}dist{/}*cp312*macosx*.whl
py313-mac: {package_root}{/}dist{/}*cp313*macosx*.whl
py39-win: {package_root}{/}dist{/}*cp39*win*.whl
py310-win: {package_root}{/}dist{/}*cp310*win*.whl
py311-win: {package_root}{/}dist{/}*cp311*win*.whl
py312-win: {package_root}{/}dist{/}*cp312*win*.whl
py313-win: {package_root}{/}dist{/}*cp313*win*.whl
allowlist_externals =
sh
commands =
sh {package_root}/scripts/build-wheel.sh
"""