-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pyproject.toml, poetry.lock and install_jigsaw.py.
In principle, this should be able to reproduce the functionality of the current setup.py into a poetry environment.
- Loading branch information
Jaime R. Calzada
committed
Aug 9, 2023
1 parent
d9d70e6
commit f917b1f
Showing
3 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from pathlib import Path | ||
import shutil | ||
import subprocess | ||
|
||
def run(): | ||
src_parent = Path(__file__).parent.resolve() | ||
jigsaw_src_dir = src_parent / "external/jigsaw" | ||
cmake_build_dir = jigsaw_src_dir / "build" | ||
cmake_build_dir.mkdir(exist_ok=True) | ||
subprocess.run( | ||
[ | ||
"cmake", | ||
'..', | ||
"-DCMAKE_BUILD_TYPE=Release", | ||
"-DCMAKE_INSTALL_PREFIX=." | ||
], | ||
cwd=cmake_build_dir | ||
) | ||
subprocess.run(["make", f"-j4"], cwd=cmake_build_dir) | ||
subprocess.run(["make", f"-j4", "install"], cwd=cmake_build_dir) | ||
exesrc_path = cmake_build_dir / "bin" | ||
libsrc_path = cmake_build_dir / "lib" | ||
exedst_path = src_parent / "jigsawpy/_bin" | ||
libdst_path = src_parent / "jigsawpy/_lib" | ||
shutil.copytree(exesrc_path, exedst_path) | ||
shutil.copytree(libsrc_path, libdst_path) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[tool.poetry] | ||
name = "jigsawpy" | ||
version = "1.0.0" | ||
description = "Python interface for the JIGSAW meshing library." | ||
authors = ["Darren Engwirda <[email protected]>"] | ||
homepage = "https://github.com/dengwirda/" | ||
keywords = ["Mesh-generation", "Delaunay", "Voronoi"] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Operating System :: OS Independent", | ||
"Intended Audience :: Science/Research", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: C++", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Scientific/Engineering :: Mathematics", | ||
"Topic :: Scientific/Engineering :: Physics", | ||
"Topic :: Scientific/Engineering :: Visualization" | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.9.0,<3.13" | ||
numpy = "^1.25.2" | ||
scipy = "^1.11.1" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry.scripts] | ||
install-jigsaw = 'install_jigsaw:run' | ||
|
||
[tool.poetry.urls] | ||
"Github" = "https://github.com/dengwirda/" |