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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8+ Windows x86-64

lummao-0.2.2-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.2-cp38-abi3-macosx_10_15_x86_64.whl (195.8 kB view details)

Uploaded CPython 3.8+ macOS 10.15+ x86-64

File details

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

File metadata

  • Download URL: lummao-0.2.2.tar.gz
  • Upload date:
  • Size: 99.7 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.2.tar.gz
Algorithm Hash digest
SHA256 92b1972671bfd9719792fe8a96c81629261c6a885736e8455a10f8e7e52d64b8
MD5 341ddb571ffae387e64095a85fef8658
BLAKE2b-256 f89ca2847927459add6d9a00ca163f9d11ad47ea5caea99944f60778418ec583

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lummao-0.2.2-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.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 75e1ad3d1cc4f97b6388d285b8068c4120e1f0cb33f7035fa283ad53eae51735
MD5 e9d566646285afda81260025232bd781
BLAKE2b-256 332cf085584769c1bc5f21f031e65b3a3b7fe03c56d9050150e1e593efd8fbe4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lummao-0.2.2-cp38-abi3-manylinux_2_24_x86_64.whl
Algorithm Hash digest
SHA256 01bc4e174e5c308f51e3f900f472b86a75d70bf336c22b5e43572d46d607bd54
MD5 a94184844e9ae2ebe60c7007a8771f00
BLAKE2b-256 f57d40dca30487fcd2d9904e0c576751e6ff8362d7da175bbfa1f3339ed51264

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lummao-0.2.2-cp38-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 7dfef6103943727a60b1a85cad9a5129dce3927f8b23d9b3fd54fd173b31758f
MD5 fa2f3722b325a4a5d1451393687627fc
BLAKE2b-256 cda236c3518d1f7a30c97b3bd652ce43043d195bdd4daa25a4e08d2b66fc2b16

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