Skip to main content

Make your mods immortal.

Project description

grug for Python

This repository provides Python bindings, a frontend, and a backend for grug.

Install this package using pip install grug-lang, and run python -c "import grug" to check it.

You can run the example program by cloning this repository, cd-ing into it, running cd example, and finally running python example.py.

Dependencies

This project requires Python version 3.7 or newer. You can manage your Python versions using pyenv.

If you want to run the tests, you'll need to install pytest:

pip install pytest
pip install -e .

If you are on a Python version older than 3.11, you will additionally need to install these:

pip install tomli importlib-metadata

Running the tests

You will need to clone the grug-tests repository next to this repository, and then run git checkout development in it, followed by ./tests.sh.

In this grug-for-python repository, you can then run all tests using this command:

pytest --grug-tests-path=../grug-tests -s

You can additionally pass --whitelisted-test=f32_too_big if you only want to run the test called f32_too_big.

Alternatively, you can walk through the tests and set breakpoints by installing the Python Debugger VS Code extension. Hit F5 to run all tests. You can edit .vscode/launch.json if you want to pass --whitelisted-test=f32_too_big.

Type checking

Run pyright in the terminal to type check the Python code. Pyright can be installed using sudo npm install -g pyright.

Updating the pypi package

python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build
python -m build
python -m pip install --upgrade twine
python -m twine upload dist/*

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

grug_lang-1.0.3.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grug_lang-1.0.3-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file grug_lang-1.0.3.tar.gz.

File metadata

  • Download URL: grug_lang-1.0.3.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for grug_lang-1.0.3.tar.gz
Algorithm Hash digest
SHA256 8cd0d150150953125d2b85c98c2f01fc1e47acded1c39d008666bb67fe0f0fd5
MD5 839bfe68e3c090f46e6759dde36984e6
BLAKE2b-256 1ca0e61869b811b9c672376745a4543f2d9c1960f3c01700d3a7efdac5de8324

See more details on using hashes here.

File details

Details for the file grug_lang-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: grug_lang-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for grug_lang-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e44ec14f0ff335722ff28f45df27aa3b11cabe8ea6bf40769933a800d843032a
MD5 cbc855091be5cfeebfaef3d8e56bd88a
BLAKE2b-256 2cff8835d5bb2dd8809fc20f473aac5db7642c70c63792e88302c5a9a32d7f13

See more details on using hashes here.

Supported by

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