Skip to main content

Verdure

© 2020-2025 Reuben Thomas rrt@sc3d.org
https://github.com/rrthomas/verdure

Verdure runs a particular version of a program, first installing it if necessary. (Users might be interested in the more capable Spack or pkgx.)

Verdure is free software, licensed under the GNU GPL version 3 (or, at your option, any later version).

Please send questions, comments, and bug reports to the maintainer, or report them on the project’s web page (see above for addresses).

Installation

Verdure requires Python 3.9 or later. To install it, run:

pip install verdure

Use

Sometimes you want to run a particular version of a program: to track down a bug in a program you use, to test a particular commit of code you’re working on, or because you’ve never gotten around to updating that crucial script to use the latest version of that program.

With verdure, you can say

verdure -- foo 1.3 --frobnicate wibble bar

and verdure will run foo --frobnicate wibble bar with foo version 1.3.

Programs are installed in $XDG_CACHE_DIR/verdure/PROGRAM/VERSION. There must be an executable in that directory called PROGRAM, and any other files required for the installation can be stored there.

The -- tells verdure that it should not try to parse what follows as options for itself. Otherwise, it might interpret some flags itself: for example, if you say verdure foo 1.3 --version then verdure will print its own version and not even try to run foo.

See verdure --help for further options.

Installing programs automatically

Programs can be installed manually, but verdure can install them automatically. To do this, use the --install-cmd argument:

verdure --install-cmd='wget https://www.example.com/$PROGRAM/$VERSION/$PROGRAM; chmod +x $PROGRAM' -- foo 1.3 --frobnicate wibble bar

The command is passed to sh -c with the environment variables PROGRAM and VERSION set to the values passed to verdure and PROGRAM_ENV set to the name of a shell file that can have environment variables and commands appended to it, and executed in the installation directory.

Installation packages, source tarballs, Git checkouts and similar directories of files used to build and install a program should be unpacked, checked out etc. into a directory called PROGRAM-VERSION.

Installation helpers

Automatic installation alone is still not that useful! Verdure’s real usefulness is its pre-written installation helpers. These are programs whose name starts verdure-, so you can see what is available by typing verdure- and pressing TAB in most shells. The supplied scripts will tell you more about themselves with --help.

The simplest installations are those of packages from an existing packaging system, such as the Python Package Index. For example, to run a Python program:

verdure --install-cmd 'verdure-pip $PROGRAM==$VERSION' -- rpl 1.7.2 --version

Verdure also comes with helpers for building packages from source, which use the standard ./configure and make combination (most commonly, with the GNU build system). Here’s an example with a program that has a GNU autotools build system:

verdure --install-cmd \
    'verdure-tarball https://github.com/rrthomas/$PROGRAM/releases/download/v$VERSION/$PROGRAM-$VERSION.tar.gz && \
    (cd $PROGRAM-$VERSION && verdure-configure-make)' \
    -- beetle 3.0.2 --version

Metadata

Release files for verdure 2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for verdure 2
File Size Uploaded
verdure-2.tar.gz 7.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for verdure 2
File Interpreter ABI Platform
verdure-2-py3-none-any.whl Python 3 none any Details

Total release size: 17.3 kB

Release files / verdure-2.tar.gz

Download URL verdure-2.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3e774bcae21fcada4620027a08722e21c463e44c3b6217d034c80e3493862ecf
BLAKE2b-256 checksum
How to use checksums
273c1f81c1c8fd16f6a66ed3b45c8abd08785bbf7d31ef3ff878693d9c8cc813
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / verdure-2-py3-none-any.whl

Download URL verdure-2-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
15809355e4a32f73bf3d6a21bbde48c7dcb58be80494270b2bcf3da28d9d8aea
BLAKE2b-256 checksum
How to use checksums
4908d040c93283482a26992124ec9a0b94043c9daea2b46ed318e7ed4ba48175
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page