From 197fb6092e28dca730653215a4d09db68952687b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Fri, 22 Aug 2025 14:51:24 +0200 Subject: [PATCH 1/5] [build] `setup.py`: Add the content of `bin` to the packaged setup The files in `bin` are already generated as executables. Additionally, they are added "as is" so they can be called as scripts. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8f7e5b4c98..9eef83f4ef 100644 --- a/setup.py +++ b/setup.py @@ -58,7 +58,7 @@ def __init__(self, script, initScript=None, base=None, targetName=None, icons=No "cmath", "numpy" ], - "include_files": ["CHANGES.md", "COPYING.md", "LICENSE-MPL2.md", "README.md"] + "include_files": ["CHANGES.md", "COPYING.md", "LICENSE-MPL2.md", "README.md", "bin"] } if os.path.isdir(os.path.join(currentDir, "tractor")): build_exe_options["packages"].append("tractor") From beece54f83bde99292fd6ed7b9fe7e12e838b33a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Fri, 22 Aug 2025 14:53:47 +0200 Subject: [PATCH 2/5] [build] `setup.py`: Remove pytest from the `install_requires` --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9eef83f4ef..64b2f0f0c6 100644 --- a/setup.py +++ b/setup.py @@ -143,7 +143,7 @@ def __init__(self, script, initScript=None, base=None, targetName=None, icons=No setup( name="Meshroom", description="Meshroom", - install_requires=['psutil', 'pytest', 'PySide6', 'markdown'], + install_requires=['psutil', 'PySide6', 'markdown'], setup_requires=[ 'cx_Freeze' ], From 571de38ef1a9e72e6c1d2a997b60de5bd3caa5bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Fri, 22 Aug 2025 15:09:58 +0200 Subject: [PATCH 3/5] [build] `setup.py`: Use double quotes everywhere --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 64b2f0f0c6..9095d2acc9 100644 --- a/setup.py +++ b/setup.py @@ -143,9 +143,9 @@ def __init__(self, script, initScript=None, base=None, targetName=None, icons=No setup( name="Meshroom", description="Meshroom", - install_requires=['psutil', 'PySide6', 'markdown'], + install_requires=["psutil", "PySide6", "markdown"], setup_requires=[ - 'cx_Freeze' + "cx_Freeze" ], version=meshroom.__version__, options={"build_exe": build_exe_options}, From 9b75a9b0add6214ce6c6bc74da021a0720ef5532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Fri, 22 Aug 2025 15:14:48 +0200 Subject: [PATCH 4/5] Update `.git-blame-ignore-revs` with changes in `setup.py` --- .git-blame-ignore-revs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 05cdecb4cf..2a4dca5c5b 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -1,3 +1,5 @@ +# [build] `setup.py`: Use double quotes everywhere +571de38ef1a9e72e6c1d2a997b60de5bd3caa5bf # [bin] `meshroom_batch`: Minor clean-up in the file 15d9ecd888faa7216cfc5d97d473f5717a3118a3 # [core] Linting following CI's flake8 report From 37c6111ded6d71ff6ba28b1f59f522f9d3c655e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Fri, 22 Aug 2025 15:17:59 +0200 Subject: [PATCH 5/5] [core] desc.node: Always use the same path to `meshroom_compute` Since the scripts are now packaged alongside their executable versions, nodes can always be executed using `bin/meshroom_compute`. The need to make a distinction between the "regular" and the "release" modes is thus removed. --- meshroom/core/desc/node.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/meshroom/core/desc/node.py b/meshroom/core/desc/node.py index 99bd98d24a..86c03d11f2 100644 --- a/meshroom/core/desc/node.py +++ b/meshroom/core/desc/node.py @@ -15,12 +15,8 @@ from meshroom.core import cgroup _MESHROOM_ROOT = Path(meshroom.__file__).parent.parent.as_posix() -if getattr(sys, "frozen", False): # When in release package mode, the path to meshroom_compute differs - _MESHROOM_COMPUTE = (Path(_MESHROOM_ROOT).parent / "meshroom_compute").as_posix() - _MESHROOM_COMPUTE_EXE = _MESHROOM_COMPUTE -else: - _MESHROOM_COMPUTE = (Path(_MESHROOM_ROOT) / "bin" / "meshroom_compute").as_posix() - _MESHROOM_COMPUTE_EXE = f"python {_MESHROOM_COMPUTE}" +_MESHROOM_COMPUTE = (Path(_MESHROOM_ROOT) / "bin" / "meshroom_compute").as_posix() +_MESHROOM_COMPUTE_EXE = f"python {_MESHROOM_COMPUTE}" class MrNodeType(enum.Enum):