Self-Contained Virtual Environment Support #137
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
john/McRogueFace#137
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
McRogueFace now supports self-contained virtual environments for pip-installed packages. Games can ship as a single directory that automatically bootstraps pip and installs dependencies on first run.
Implementation
C++ Changes (
src/McRFPy_API.cpp)Set
sys.executable: Bothinit_python()andinit_python_with_config()now setpyconfig.executableto the McRogueFace binary path. This enablessubprocess.run([sys.executable, ...])to work.Sibling venv detection: On startup, checks for
./venv/directory alongside the executable. If found, prepends the platform-appropriate site-packages path:venv/lib/python3.14/site-packagesvenv/Lib/site-packagesPython Reference Implementation (
src/scripts/mcrf_venv.py)New module providing:
Usage
Simple Setup (game.py)
With requirements.txt
Distribution Structure
Notes
ensurepip/_bundled/pip-*.whl(already bundled)Related