sotn-decomp/tools/splat_ext
Jonathan Hohle 8287841ccd
Python virtualenv Support (#1620)
Ubuntu/Debian and Python recommend using virtual environments for
project-specific Python dependencies and as of Ubuntu 24 this is lightly
enforced when installing packages via pip. This is due to pip and the
system package manager installing files to the same location which may
cause either's internal state to no longer reflect what is actually
installed.

This updates the project to use a Python `virtualenv` for project
dependencies and updates internal scripts to support both global and
virtualenvs, but favors virtualenvs for new workspaces.

All tools that hardcode `/usr/bin/python3` now use `env(1)` to find the
first `python3` in the path. For those with a virtualenv configured,
this will be the Python managed there. For everyone else, this should be
the system Python or whatever other scheme they may have used previously
(assuming `python3` already existed in their `PATH`).

The `Makefile` has been updated to prepend `.venv/bin` to the `PATH` and
use `python3` from there if it exists and has been configured. It also
has a new `python-dependencies` target which will configure the venv and
install all python dependnecies there.

The `Dockerfile` has been updated to create an external `.venv` outside
of the project directory. Python's `virtualenv`s are not relocatable and
may hardcode paths which are mounted differently in the container and
host. To deal with differences in paths between the container (which
mounts the host's project directory to `/sotn`) host which may be at an
arbitarary directory the `VENV_PATH` environment variable is used to
override paths in the `Makefile`.

GitHub workflows have been updated to use `.venv`.
2024-09-17 23:19:20 -07:00
..
__init__.py WRP split some data and add new split tools (#109) 2023-03-09 13:32:00 +00:00
accessory_config.json Synchronise asset config with the latest headers (#849) 2023-12-15 13:58:26 -08:00
animset.py Python virtualenv Support (#1620) 2024-09-17 23:19:20 -07:00
assets.py Python virtualenv Support (#1620) 2024-09-17 23:19:20 -07:00
ci4.py Update splat to 0.24.4 (#1112) 2024-06-12 18:50:32 +01:00
cmp.py Update splat to 0.24.4 (#1112) 2024-06-12 18:50:32 +01:00
enemydefs_config.json Extract g_EnemyDefs with new system (#666) 2023-10-09 09:59:57 +01:00
equipment_config.json Synchronise asset config with the latest headers (#849) 2023-12-15 13:58:26 -08:00
factory_blueprint_config.json Split out data table for func_8011AC3C (#710) 2023-11-07 16:54:59 +00:00
grey4.py Update splat to 0.24.4 (#1112) 2024-06-12 18:50:32 +01:00
i4.py Update splat to 0.24.4 (#1112) 2024-06-12 18:50:32 +01:00
music_xa_config.json Extract XA music configs (#778) 2023-11-17 11:43:40 -08:00
palette.py Update splat to 0.24.4 (#1112) 2024-06-12 18:50:32 +01:00
raw.py Update splat to 0.24.4 (#1112) 2024-06-12 18:50:32 +01:00
rgba16.py Update splat to 0.24.4 (#1112) 2024-06-12 18:50:32 +01:00
sfx_config.json Improve sfx docs (#1540) 2024-08-19 23:01:59 +01:00
spritesheet.py Python virtualenv Support (#1620) 2024-09-17 23:19:20 -07:00
subweapondefs_config.json Extract subweapon definitions (#790) 2023-11-19 00:32:27 +00:00
utils.py Update splat to 0.24.4 (#1112) 2024-06-12 18:50:32 +01:00