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

pip install -e .

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.3.1.tar.gz (239.2 kB view details)

Uploaded Source

Built Distributions

lummao-0.3.1-cp38-abi3-win_amd64.whl (193.6 kB view details)

Uploaded CPython 3.8+ Windows x86-64

lummao-0.3.1-cp38-abi3-manylinux_2_24_x86_64.whl (3.5 MB view details)

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

lummao-0.3.1-cp38-abi3-macosx_10_15_x86_64.whl (238.1 kB view details)

Uploaded CPython 3.8+ macOS 10.15+ x86-64

File details

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

File metadata

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

File hashes

Hashes for lummao-0.3.1.tar.gz
Algorithm Hash digest
SHA256 11c60be2bf95f255e0931077389719924f6602a92406c6f8226a8b5fe7602c8f
MD5 8775115be4cfea27d05c5bcb714c2db2
BLAKE2b-256 af01c2c8e54bb666dd4db9bd5173ce2d42f45e3fe3b22aff1943bdd28eba81b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lummao-0.3.1-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 193.6 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.3.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2518132d23a7bfd39f46f01e22599a813daed4883e01f9b7da74e9ce856df239
MD5 eaead9900122f133cc1f22e9c50ebc58
BLAKE2b-256 02cf364865699695703fc5adc8a73914335e4a991f607ab73b73d5509849c156

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lummao-0.3.1-cp38-abi3-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 3c94f8df5f63610fa158133c8180eea9e02e3842b289f42c9ce7bf19fbc95fab
MD5 9f503b50fb202264c0385f47281ef49b
BLAKE2b-256 7337be2436c866e1dec5f63757e694be8490cfab4dbcbaa118dba345df28c8a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lummao-0.3.1-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 30f508a713cfacccb9bb3a7e9c5362c28be1b4907e3bde1ed629fc5b5b785758
MD5 a5cb1051e5450579383c43fdeb1a67b4
BLAKE2b-256 9124a5aa9663fd351dede770c08cdfd16841ec65ef0e75df9ed7fd83a3203f5c

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