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 of local LSL testing with Lummao, see https://github.com/SaladDais/SLGraphPather or https://github.com/SaladDais/SickJoke'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.

If you just want to run an LSL script from the command-line, the shellsl command will be installed alongside lummao, and can be run from the commandline like so:

$ shellsl tests/test_resources/lsl_conformance.lsl
All tests passed

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
    • auto-stubs for all functions

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8+ Windows x86-64

lummao-0.5.2-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.5.2-cp38-abi3-macosx_11_0_x86_64.whl (238.0 kB view details)

Uploaded CPython 3.8+ macOS 11.0+ x86-64

File details

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

File metadata

  • Download URL: lummao-0.5.2.tar.gz
  • Upload date:
  • Size: 238.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for lummao-0.5.2.tar.gz
Algorithm Hash digest
SHA256 c8e5f907a1c7810c9d0f141137a51946dc41f53a1cb305c42ea6b4b56fb175a5
MD5 a2f4f7336a0e9c52c70c73e05c6e7a0a
BLAKE2b-256 874ba177bf9a87c230fec15851806725e83c7888e8844ae74c13921b173230cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lummao-0.5.2-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.2 CPython/3.11.6

File hashes

Hashes for lummao-0.5.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4173a153829c2eba532b9e3559e20b354667c190caeaa1f584caa98f121416f6
MD5 19b878780eceabcdd0fd04aa4efec948
BLAKE2b-256 e23ebb8457b0be9051d2bb68f5653cfd4e252453ce8a0770f9e0c79a311ad6b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lummao-0.5.2-cp38-abi3-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 bb1750aef607b88b37f1cccae81bc080c1fe937aa657316983ad4e68d1dd8a47
MD5 04808873489f71edec95e37073561ef7
BLAKE2b-256 d71b3647ca012150ba30cabce89218ac6aa4064d5052821b4fc664eb036fda06

See more details on using hashes here.

File details

Details for the file lummao-0.5.2-cp38-abi3-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for lummao-0.5.2-cp38-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 68e20d23889ba4bfde8289cde25c14a7a58dc360af94c68313dfb6e1380dda6f
MD5 25335f61caf88065095198ec5986320d
BLAKE2b-256 95f87e27edabdc108c84a8994eacf20396eb8177cd9ba56fb149e85f79dc842e

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