Skip to content

Commit

Permalink
ENH: Add pyproject.toml configurations
Browse files Browse the repository at this point in the history
Additions from bindgen include itkwasm-mesh-io testing dependency.
  • Loading branch information
thewtex committed Nov 30, 2023
1 parent cda516f commit 0c96442
Show file tree
Hide file tree
Showing 3 changed files with 213 additions and 0 deletions.
73 changes: 73 additions & 0 deletions wasm/python/itkwasm-mesh-to-poly-data-emscripten/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "itkwasm-mesh-to-poly-data-emscripten"
readme = "README.md"
license = "Apache-2.0"
dynamic = ["version"]
description = "Convert an ITK Mesh to a simple data structure compatible with vtkPolyData."
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: C++",
"Environment :: WebAssembly",
"Environment :: WebAssembly :: Emscripten",
"Environment :: WebAssembly :: WASI",
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
keywords = [
"itkwasm",
"webassembly",
"emscripten",
]

requires-python = ">=3.8"
dependencies = [
"itkwasm >= 1.0.b145",
]

[tool.hatch.version]
path = "itkwasm_mesh_to_poly_data_emscripten/_version.py"

[tool.hatch.envs.default]
dependencies = [
"pytest",
"pytest-pyodide",
]

[project.urls]
Home = "https://github.com/InsightSoftwareConsortium/ITKMeshToPolyData"
Source = "https://github.com/InsightSoftwareConsortium/ITKMeshToPolyData"

[tool.hatch.envs.default.scripts]
test = [
"hatch build -t wheel",
"pytest --dist-dir=./dist --rt=chrome",
]
download-pyodide = [
"curl -L https://github.com/pyodide/pyodide/releases/download/0.24.1/pyodide-0.24.1.tar.bz2 -o pyodide.tar.bz2",
"tar xjf pyodide.tar.bz2",
"rm -rf dist pyodide.tar.bz2",
"mv pyodide dist",
]
serve = [
"hatch build -t wheel",
'echo "\nVisit http://localhost:8877/console.html\n"',
"python -m http.server --directory=./dist 8877",
]


[tool.hatch.build]
exclude = [
"/examples",
]
61 changes: 61 additions & 0 deletions wasm/python/itkwasm-mesh-to-poly-data-wasi/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "itkwasm-mesh-to-poly-data-wasi"
readme = "README.md"
license = "Apache-2.0"
dynamic = ["version"]
description = "Convert an ITK Mesh to a simple data structure compatible with vtkPolyData."
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: C++",
"Environment :: WebAssembly",
"Environment :: WebAssembly :: Emscripten",
"Environment :: WebAssembly :: WASI",
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
keywords = [
"itkwasm",
"webassembly",
"wasi",
]

requires-python = ">=3.8"
dependencies = [
"itkwasm >= 1.0.b145",
"importlib_resources",

]

[tool.hatch.version]
path = "itkwasm_mesh_to_poly_data_wasi/_version.py"

[tool.hatch.envs.default]
dependencies = [
"pytest",
"itkwasm-mesh-io",
]

[project.urls]
Home = "https://github.com/InsightSoftwareConsortium/ITKMeshToPolyData"
Source = "https://github.com/InsightSoftwareConsortium/ITKMeshToPolyData"

[tool.hatch.envs.default.scripts]
test = "pytest"


[tool.hatch.build]
exclude = [
"/examples",
]
79 changes: 79 additions & 0 deletions wasm/python/itkwasm-mesh-to-poly-data/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "itkwasm-mesh-to-poly-data"
readme = "README.md"
license = "Apache-2.0"
dynamic = ["version"]
description = "Convert an ITK Mesh to a simple data structure compatible with vtkPolyData."
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: C++",
"Environment :: WebAssembly",
"Environment :: WebAssembly :: Emscripten",
"Environment :: WebAssembly :: WASI",
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
keywords = [
"itkwasm",
"webassembly",
"wasi",
"emscripten",
]

requires-python = ">=3.8"
dependencies = [
"itkwasm >= 1.0.b145",
"itkwasm-mesh-to-poly-data-wasi; sys_platform != \"emscripten\"",
"itkwasm-mesh-to-poly-data-emscripten; sys_platform == \"emscripten\"",

]

[tool.hatch.version]
path = "itkwasm_mesh_to_poly_data/_version.py"

[tool.hatch.envs.default]
dependencies = [
"pytest",
"pytest-pyodide",
"itkwasm-mesh-io",
]

[project.urls]
Home = "https://github.com/InsightSoftwareConsortium/ITKMeshToPolyData"
Source = "https://github.com/InsightSoftwareConsortium/ITKMeshToPolyData"

[tool.hatch.envs.default.scripts]
test = [
"hatch build -t wheel",
"pytest --dist-dir=./dist --rt=chrome",
]
download-pyodide = [
"curl -L https://github.com/pyodide/pyodide/releases/download/0.24.1/pyodide-0.24.1.tar.bz2 -o pyodide.tar.bz2",
"tar xjf pyodide.tar.bz2",
"rm -rf dist pyodide.tar.bz2",
"mv pyodide dist",
]
serve = [
"hatch build -t wheel",
'echo "\nVisit http://localhost:8877/console.html\n"',
"python -m http.server --directory=./dist 8877",
]



[tool.hatch.build]
exclude = [
"/examples",
]

0 comments on commit 0c96442

Please sign in to comment.