Metadata-Version: 2.4
Name: eudplib
Version: 0.81.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Games/Entertainment :: Real Time Strategy
Requires-Dist: typing-extensions
License-File: LICENSE
Summary: eudplib is a package which provides scripting for StarCraft Use Map Setting(UMS) to UMS map and tool developers.
Keywords: StarCraft,EUD,Trigger
Author-email: Trgk <whyask37@naver.com>, Armoha <kein0011@naver.com>
Maintainer-email: Armoha <kein0011@naver.com>
License-Expression: MIT
Requires-Python: >=3.10, <3.15
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: changelog, https://github.com/armoha/euddraft/blob/master/CHANGELOG.md
Project-URL: documentation, https://github.com/armoha/euddraft/wiki
Project-URL: homepage, https://github.com/armoha/eudplib/
Project-URL: issues, https://github.com/armoha/euddraft/issues
Project-URL: source, https://github.com/armoha/eudplib/

# eudplib : EUD python library

`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

## Features

- 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

## Where is the issue tracker?

The eudplib issue tracker lives in [euddraft repository](https://github.com/armoha/euddraft/issues/).

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.

## Building from source

`eudplib` has two native components:

- the `_rust` Python extension (`eudplib.bindings._rust`), built from `src/rust` with [maturin](https://www.maturin.rs/) during `pip install`.
- the `epScript` compiler shared library (`libepScriptLib`), a C++ library loaded through `ctypes` at runtime under the platform-specific name (`libepScriptLib.so` on Linux, `libepScriptLib.dylib` on macOS, `libepScriptLib.dll` on 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).

### Prerequisites

- Python >= 3.10
- Rust toolchain (for the `_rust` extension)
- CMake >= 3.6 and a C++ compiler (MSVC on Windows, g++ on Linux, clang on macOS)
- Python development headers, needed to configure the `pyepScript` pybind11 binding (e.g. `python3-dev` on 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.

### Build `libepScriptLib`

#### Linux / macOS

```bash
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/ # macOS
```

#### Windows

```powershell
git 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.dll
```

Note: 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.

### Install the package

```bash
pip install .
```

For development, install in editable mode instead:

```bash
pip install -e .
```
