eudplib is a StarCraft Use Map Setting(UMS) map tool library for Python programming language.
Fork of https://github.com/phu54321/eudplib
For easy-to-use executable, see https://github.com/armoha/euddraft/releases
- Support opening (unprotected) map and extracting scenario.chk data
- Powerful trigger scripting
- Edit input map to compile output EUD map
epScript, scripting language for StarCraft Trigger similar to JavaScript
The eudplib issue tracker lives in euddraft repository.
Since euddraft is standalone distribution for Python, eudplib, freeze map protector and epTrace line profiler, it's convenient to use a single issue tracker for both.
eudplib has two native components:
- the
_rustPython extension (eudplib.bindings._rust), built fromsrc/rustwith maturin duringpip install. - the
epScriptcompiler shared library (libepScriptLib), a C++ library loaded throughctypesat runtime under the platform-specific name (libepScriptLib.soon Linux,libepScriptLib.dylibon macOS,libepScriptLib.dllon Windows).
pip install . (and pip install -e .) build libepScriptLib automatically through a
custom PEP 517 backend, so no extra steps are needed to install or develop the package.
The steps below build the library manually, e.g. when using maturin develop
directly (which bypasses the PEP 517 backend).
- Python >= 3.10
- Rust toolchain (for the
_rustextension) - CMake >= 3.6 and a C++ compiler (MSVC on Windows, g++ on Linux, clang on macOS)
- Python development headers, needed to configure the
pyepScriptpybind11 binding (e.g.python3-devon Debian/Ubuntu; already available on the GitHub Actions runners)
The parser parser/epparser.cpp is generated by lemon2 (committed as lemon2.exe on Windows); on other platforms it must be compiled from lemon2.c first. Alternatively, run python src/epscript/build_epscript.py, which does all of the following steps.
git clone https://github.com/armoha/eudplib --recursive
cd eudplib/src/epscript
cc -std=gnu89 -O2 -o lemon2 lemon2.c # parser generator (not needed on Windows)
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --target epScriptLib
cp build/libepScriptLib.so ../eudplib/epscript/ # Linux
# cp build/libepScriptLib.dylib ../eudplib/epscript/ # macOSgit clone https://github.com/armoha/eudplib --recursive
cd eudplib\src\epscript
cmake -S . -B build -A x64
cmake --build build --target epScriptLib --config Release
copy build\Release\epScriptLib.dll ..\eudplib\epscript\libepScriptLib.dllNote: the CMake target is named epScriptLib, so on Windows the produced file is epScriptLib.dll; it must be renamed to libepScriptLib.dll to match what eudplib.epscript.epscompile loads.
pip install .For development, install in editable mode instead:
pip install -e .