Skip to content

Commit 0508094

Browse files
author
Jaime R. Calzada
committed
Added a poetry run command to install_jigsaw.
1 parent 55656ba commit 0508094

File tree

5 files changed

+8
-56
lines changed

5 files changed

+8
-56
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,3 @@ var/
3535
*.off
3636
*.obj
3737
*.stl
38-
39-
# scons
40-
.sconsign.dblite

build_scons.py

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
from pathlib import Path
2-
import subprocess
3-
import sys
42
import shutil
3+
import subprocess
54

6-
from SCons.Script import Environment, Dir
7-
8-
9-
def build_cmake(env, target, source):
10-
scons_file_parent = Path(Dir('.').abspath)
11-
jigsaw_src_dir = scons_file_parent / "external/jigsaw"
5+
def run():
6+
src_parent = Path(__file__).parent.resolve()
7+
jigsaw_src_dir = src_parent / "external/jigsaw"
128
cmake_build_dir = jigsaw_src_dir / "build"
139
cmake_build_dir.mkdir(exist_ok=True)
1410
subprocess.run(
@@ -24,11 +20,7 @@ def build_cmake(env, target, source):
2420
subprocess.run(["make", f"-j4", "install"], cwd=cmake_build_dir)
2521
exesrc_path = cmake_build_dir / "bin"
2622
libsrc_path = cmake_build_dir / "lib"
27-
exedst_path = scons_file_parent / "jigsawpy/_bin"
28-
libdst_path = scons_file_parent / "jigsawpy/_lib"
23+
exedst_path = src_parent / "jigsawpy/_bin"
24+
libdst_path = src_parent / "jigsawpy/_lib"
2925
shutil.copytree(exesrc_path, exedst_path)
3026
shutil.copytree(libsrc_path, libdst_path)
31-
32-
env = Environment()
33-
34-
env.Command(target="build", source=[], action=build_cmake)

poetry.lock

Lines changed: 1 addition & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,12 @@ python = ">=3.9.0,<3.13"
2323
numpy = "^1.25.2"
2424
scipy = "^1.11.1"
2525

26-
[tool.poetry.group.dev.dependencies]
27-
scons = "^4.5.2"
28-
2926
[build-system]
3027
requires = ["poetry-core"]
3128
build-backend = "poetry.core.masonry.api"
3229

3330
[tool.poetry.scripts]
34-
install-jigsaw = 'build_scons:run'
31+
install-jigsaw = 'install_jigsaw:run'
3532

3633
[tool.poetry.urls]
3734
"Github" = "https://github.com/dengwirda/"

0 commit comments

Comments
 (0)