Skip to content

Commit 8a8d215

Browse files
committed
Migrate project data from setup.py -> pyproject.toml
Preperation for using setuptools-git-versioning which will require a [project] entry in pyproject.toml. Once that exists many keywords in setup.py would need to be declared as dynamic in pyproject.toml. Since they're in practice static I elected to bite the bullet and migrate everything. An example error ``` ******************************************************************************** The following seems to be defined outside of `pyproject.toml`: `description = 'A WebAssembly runtime powered by Wasmtime'` According to the spec (see the link below), however, setuptools CANNOT consider this value unless `description` is listed as `dynamic`. https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table To prevent this problem, you can list `description` under `dynamic` or alternatively remove the `[project]` table from your file and rely entirely on other means of configuration. ******************************************************************************** ```
1 parent 1d44dad commit 8a8d215

File tree

2 files changed

+67
-82
lines changed

2 files changed

+67
-82
lines changed

pyproject.toml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,70 @@ build-backend = "backend"
77
backend-path = [
88
"ci/_custom_build",
99
]
10+
11+
[project]
12+
name = "wasmtime"
13+
version = "33.0.0"
14+
description = "A WebAssembly runtime powered by Wasmtime"
15+
license = "Apache-2.0 WITH LLVM-exception"
16+
readme = "README.md"
17+
authors = [
18+
{name="The Wasmtime Project Developers", email="[email protected]"},
19+
]
20+
requires-python=">=3.9"
21+
dependencies = [
22+
"importlib_resources>=5.10",
23+
]
24+
classifiers=[
25+
"Programming Language :: Python",
26+
"Programming Language :: Python :: 3",
27+
"Programming Language :: Python :: 3.9",
28+
"Programming Language :: Python :: 3.10",
29+
"Programming Language :: Python :: 3.11",
30+
"Programming Language :: Python :: 3.12",
31+
"Programming Language :: Python :: 3.13",
32+
"Programming Language :: Python :: Implementation :: CPython",
33+
"Programming Language :: Python :: Implementation :: PyPy",
34+
"Programming Language :: Rust",
35+
"Topic :: Software Development :: Compilers",
36+
"Topic :: Software Development :: Interpreters",
37+
]
38+
39+
[project.optional-dependencies]
40+
testing = [
41+
"coverage",
42+
"pycparser",
43+
"pytest-mypy",
44+
"pytest",
45+
# componentize-py only support x86_64 builds on Windows
46+
# platform.machine() on Windows returns 'AMD64' for x86_64
47+
"componentize-py; platform_system != 'Windows' or platform_machine == 'AMD64'",
48+
]
49+
50+
[project.urls]
51+
"Homepacge" = "https://github.com/bytecodealliance/wasmtime-py"
52+
"Bug Tracker" = "https://github.com/bytecodealliance/wasmtime-py/issues"
53+
"Documentation" = "https://bytecodealliance.github.io/wasmtime-py/"
54+
"Source Code" = "https://github.com/bytecodealliance/wasmtime-py"
55+
56+
[tool.setuptools]
57+
include-package-data = true
58+
packages = [
59+
"wasmtime",
60+
"wasmtime.bindgen",
61+
]
62+
63+
[tool.setuptools.package-data]
64+
"wasmtime" = [
65+
# Wasmtime shared library. Downloaded by ci/download-wasmtime.py
66+
"*-*/*.dll",
67+
"*-*/*.dylib",
68+
"*-*/*.so",
69+
"py.typed",
70+
]
71+
"wasmtime.bindgen" = [
72+
# WebAssmbly modules, python bindings. Generated by ci/build-rust.py
73+
"generated/*.py",
74+
"generated/*.wasm",
75+
"generated/imports/*.py",
76+
]

setup.py

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)