A Minimalist Python Version Manager

Harsh Singh - Oct 2 - - Dev Community

Python Support in Shuru: Version 0.0.9

Shuru just got an upgrade—Python version management is now live! If you’ve been using Shuru for your Node.js tasks, you'll be glad to know you can now manage your Python versions with the same ease.

What’s New?

With this latest release (v0.0.9), Shuru can download, build, and install Python from source, all by simply configuring your shuru.toml. No need for extra tools like pyenv anymore. Just define the Python version you need, and Shuru takes care of the rest.

Here’s how it looks in your shuru.toml:

[versions]
python = "3.10.2"

[[task]]
name = "setup"
command = "pip install -r requirements.txt"

[[task]]
name = "run"
command = "python app.py"
default = true
Enter fullscreen mode Exit fullscreen mode

Under the Hood

When you specify a Python version, Shuru will:

  1. Download the Source: It grabs the specified version from the official Python website.
  2. Compile It: This isn’t just a simple download and go. Shuru compiles Python from source, allowing for greater customization if you need it.
  3. Install: Finally, it installs Python in your designated environment.

If you want to see the build process in real-time, set the SHURU_BUILD_PYTHON_VERBOSE environment variable:

export SHURU_BUILD_PYTHON_VERBOSE=1
Enter fullscreen mode Exit fullscreen mode

With this variable enabled, you’ll get detailed output during the build, making it easier to troubleshoot if anything goes wrong.

What About Node.js?

Python isn’t the only language Shuru supports. It still manages your Node.js versions in the same way, so you can seamlessly switch between environments for different projects. Shuru makes it easy to configure both in a single file, ensuring you’re always running the correct versions for your applications.

Final Thoughts

This addition makes Shuru a more versatile tool for developers who work in both JavaScript and Python. Managing your development environment should be straightforward, and Shuru aims to simplify that process.

Check out the latest version on GitHub and start integrating Python management into your workflow. Happy coding!

. .
Terabox Video Player