jgabaut / sprites4curses

Small C library to deal with simple sprites in ncurses, with a raylib extension to reuse assets. Includes python scripts to convert png sprites to a char representation.
GNU General Public License v3.0
2 stars 0 forks source link

[FEATURE] Deprecate direct s4c-script vendoring #87

Open jgabaut opened 10 months ago

jgabaut commented 10 months ago

As of version 0.4.3, the ./scripts directory contains some wrappers that should emulate previous behaviour.

This is sprites.py, for example:

#!/bin/python3

import sys
from s4c.core.sprites import main

if __name__ == "__main__":
    main(sys.argv)

The import works by leveraging a symlink for ./scripts/s4c:

./scripts/s4c -> ./s4c-scripts/s4c.

The old versions of the scripts are available under ./scripts-legacy.

Eventually, these will be removed. The patch needed in any Makefile using the scripts directly would be something like this:

<   python3 ./sprites4curses/scripts/palette.py C-impl $(PALETTE_PATH) .. > ./src/palette.c
<   python3 ./sprites4curses/scripts/palette.py C-header $(PALETTE_PATH) .. > ./src/palette.h
---
>   python3 -m sprites4curses.s4c-scripts.s4c.core.palette C-impl $(PALETTE_PATH) .. > ./src/palette.c
>   python3 -m sprites4curses.s4c-scripts.s4c.core.palette C-header $(PALETTE_PATH) .. > ./src/palette.h
jgabaut commented 10 months ago

Version 0.4.4 drops the old scripts (scripts-legacy/).