Skip to main content

Toolkit for compiling and executing the Linden Scripting Language as Python

Project description

Lummao

Lummao is a toolkit for compiling and executing the Linden Scripting Language as Python. It aims to ease testing of LSL code by leveraging Python's existing ecosystem for debugging and testing. Think of it as the less opinionated, stupider cousin of LSLForge's unit testing framework.

The runtime is largely handled by the excellent implementation of LSL's basic operations and library functions from Sei Lisa's LSL-PyOptimizer. See vendor/lslopt for Lummao's vendored copy of LSL-Pyoptimizer.

To see an example input script and its Python output, see the test_resources directory.

Setup

pip install --upgrade pip
pip install lummao

From source

How

For a real-world example, see https://github.com/SaladDais/SLGraphPather's tests and test coverage reporting.

Along with the python API, a helper lummao script is provided that takes in an LSL file and outputs a python file. It can be invoked like lummao input.lsl output.py.

Why

If you've ever written a sufficiently complicated system in LSL, you know how annoying it is to debug your scripts or be sure if they're even correct. Clearly the sanest way to bring sanity to your workflow is to convert your LSL scripts to Python, so you can mock LSL library functions and use Python debuggers. Hence the name "Lummao".

TODO

  • Symbol shadowing behavior is not correct. Python has very different shadowing rules.
  • Provide mock helpers for:
    • inter-script communication
    • HTTP
    • auto-stubs for all functions
    • state-aware event queueing

License

GPLv3

Licensing Clarifications

The output of the compiler necessarily links against the GPL-licensed runtime code from LSL-PyOptimizer for functionality, and LSL-PyOptimizer does not provide a library exception in its license. You should assume that any LSL converted to Python by the compiler and any testcases you write exercising them must also be distributable under the GPL.

In short: If or when you distribute your testcases, you must also allow distribution of their direct dependencies (your LSL scripts) under the terms of the GPL. This does not necessarily change the license of your LSL scripts themselves, or require consumers of your scripts to license their own scripts under the GPL. It is perfectly possible to have an otherwise MIT-licensed or proprietary library with a GPL-licensed test suite. No distribution of testcases == no requirement to distribute under the GPL.

Suggested reading to understand your rights and obligations under the GPL when using a GPL-licensed test suite:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lummao-0.2.1.tar.gz (99.6 kB view details)

Uploaded Source

Built Distributions

lummao-0.2.1-cp38-abi3-win_amd64.whl (161.9 kB view details)

Uploaded CPython 3.8+ Windows x86-64

lummao-0.2.1-cp38-abi3-manylinux_2_24_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.24+ x86-64

lummao-0.2.1-cp38-abi3-macosx_10_15_x86_64.whl (196.6 kB view details)

Uploaded CPython 3.8+ macOS 10.15+ x86-64

File details

Details for the file lummao-0.2.1.tar.gz.

File metadata

  • Download URL: lummao-0.2.1.tar.gz
  • Upload date:
  • Size: 99.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for lummao-0.2.1.tar.gz
Algorithm Hash digest
SHA256 a933be0eabd9d7d515ef0d63a6a2a15bddc088952f2e305d0eb648da68d228c7
MD5 6a2091d34a0529ea321f08ba9fb9af2a
BLAKE2b-256 53b177e573f80674a92c53e94544339c1be949789b9252b850a26dd6ee825b53

See more details on using hashes here.

File details

Details for the file lummao-0.2.1-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: lummao-0.2.1-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 161.9 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for lummao-0.2.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0893154da2f51615d5b805de01c3cb4abac588c511044fa5ab8ccccb4ded5b46
MD5 5ea11d00592a5d35a372540d1db3a41c
BLAKE2b-256 36a92989d849471601c0853d048b1aac8a00822cc22f0b722dfe093dcb017c70

See more details on using hashes here.

File details

Details for the file lummao-0.2.1-cp38-abi3-manylinux_2_24_x86_64.whl.

File metadata

File hashes

Hashes for lummao-0.2.1-cp38-abi3-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 1a81212356d7cb89641110cf4d9c43b80e61e54fd0e6b558438e4114e0d55a01
MD5 e0d79073cb3f55e5e5e601207b02acf0
BLAKE2b-256 2f92c6a08bde7a839ba808a44d6f1c1826e6a7e3855f53faa6fa2dd621336103

See more details on using hashes here.

File details

Details for the file lummao-0.2.1-cp38-abi3-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for lummao-0.2.1-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 d428359f8101a1b32534fd71812488dbf5e9d889b955c5194be90dcbbb9d4ff2
MD5 7c822c0bff1159230329a615700902c0
BLAKE2b-256 de1703c50b74c7d013e9e5dd2d7e2dadb4ed329e6ac0f504728b2a2d08fa106c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page