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

Uploaded Python 3

File details

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

File metadata

  • Download URL: grug_lang-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 34cbadfe48be667f7d22b5bff2abbd7f3b540d976526a192083183ae811443aa
MD5 76c4dd97f3fa7829ffed56ceddd402e1
BLAKE2b-256 311877fcf8ca22ec0d03fa1c2838933441c4b20f370bb2b8329a6846c77dc57a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: grug_lang-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 20268e3de6b1283c4b9049939b032d4fccd388b83ea910c5bd84d9ba878bc7ae
MD5 a649cc5a2aff9125549757c7c112c211
BLAKE2b-256 997549bc94e1c08ce9fc25508f910ef0fc6490ba266771e7ff8e70f17483604f

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