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.2.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.2-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: grug_lang-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 a5599ac9f0ff3f6dbe05b57fa59b08628f9b7af04b8f9e8c1c270147cbb0f1dc
MD5 69d1888689167f2fd8236ee40b3f3a71
BLAKE2b-256 cef36404c5831b1c1d1c27b5ef5dfd513f5015616ba790d2a2ce53f6bc96b06b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: grug_lang-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3d9cbf088dc5d67d47f8bbb079836b41e7ac98dfd472e3b1b226bc7d1cb118c5
MD5 20df0cfbbd4e22d29af1d9bbe5c05721
BLAKE2b-256 7cc6aed0d1549b97f1f2d064edc79475e3ae07f29cda28dc19f63e0b517b8c56

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