-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[build] Package the scripts in bin alongside the executables
#2853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the build configuration to package the bin directory scripts alongside executables, simplifying the Meshroom compute script handling and removing unnecessary dependencies.
- Include
bindirectory in packaged builds to enable both executable and script-based invocation - Remove pytest from install requirements since tests aren't packaged
- Standardize quote usage in setup.py to double quotes
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| setup.py | Adds bin directory to packaged files, removes pytest dependency, and standardizes quotes |
| meshroom/core/desc/node.py | Simplifies meshroom_compute path logic by removing release mode distinction |
| .git-blame-ignore-revs | Adds blame ignore entry for quote standardization commit |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| _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}" |
Copilot
AI
Aug 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of the frozen/release mode check may break functionality when running from a packaged executable. In release mode, the script should be executed directly without the 'python' prefix, but now it will always prepend 'python' even when the script is a standalone executable.
| _MESHROOM_COMPUTE_EXE = f"python {_MESHROOM_COMPUTE}" | |
| if getattr(sys, 'frozen', False): | |
| _MESHROOM_COMPUTE_EXE = _MESHROOM_COMPUTE | |
| else: | |
| _MESHROOM_COMPUTE_EXE = f"python {_MESHROOM_COMPUTE}" |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2853 +/- ##
===========================================
+ Coverage 77.77% 77.79% +0.01%
===========================================
Files 50 50
Lines 6728 6725 -3
===========================================
- Hits 5233 5232 -1
+ Misses 1495 1493 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a617573 to
8514fd0
Compare
8514fd0 to
a946bc7
Compare
The files in `bin` are already generated as executables. Additionally, they are added "as is" so they can be called as scripts.
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.
a946bc7 to
37c6111
Compare
Description
This PR updates the build options in
setup.pyto include thebindirectory in the packaged version of Meshroom: the executables for these scripts will still be generated, but they will also be added as is to abindirectory, meaning one can do bothmeshroom_compute [options]andpython bin/meshroom_compute [options].This allows to simplify the calls to
meshroom_computein theNodeclass, as the need to distinguish the "release mode" from the "regular mode" disappears.Additionally, "pytest" is removed from the list of
install_requiresas no test is ever packaged.Finally, all the remaining single quotes in
setup.pyare replaced with double ones.Features list
binfoldermeshroom_computein and out of "release mode"