dggrid4py.tool

Portable DGGRID binary

If DGGRID can neither be installed from conda-forge nor compiled, dggrid4py can download a portable binary from the DGGRID_portables releases. The binaries are built without GDAL and are still experimental, see Usage for an example, the available lines (stable, edge) and the points to consider.

Download of the portable DGGRID binaries from https://github.com/allixender/DGGRID_portables

The portable binaries are built without GDAL, use them with has_gdal=False.

Functions

get_portable_executable([folder, line, force])

Download the portable DGGRID binary for the current platform and return the absolute path of the executable.

portable_release([line])

Release tag in DGGRID_portables for a line of portable binaries.

portable_asset_name([system, machine])

Name of the portable DGGRID archive for a platform, by default for the current one.

download_executable(url[, folder])

Download a single executable file into folder and return its absolute path.

dggrid4py.tool.download_executable(url, folder='./')

Download a single executable file into folder and return its absolute path.

dggrid4py.tool.get_portable_executable(folder='./', line='stable', force=False)

Download the portable DGGRID binary for the current platform and return the absolute path of the executable.

The archive is taken from the DGGRID_portables release of the given line, verified against the SHA256SUMS file of that release, and unpacked into a subfolder of folder that is named after the release. A binary that is already there is used again as long as its checksum is the one of the release, so a rolling release is downloaded again only after it was rebuilt. Without a network connection, a binary that is already there is returned.

Parameters:
  • folder (str) – where the binaries are kept, created if needed

  • line (str) – stable (default, the DGGRID release that this dggrid4py version is tested with), edge (rolling pre-release of the current DGGRID development version), or any release tag of DGGRID_portables, e.g. edge-v91b

  • force (bool) – download again, also if the binary is already there

Returns:

absolute path of the dggrid executable

Return type:

str

Raises:

ValueError – if there is no portable binary for this platform, no such release, or the checksum does not match

dggrid4py.tool.portable_asset_name(system=None, machine=None)

Name of the portable DGGRID archive for a platform, by default for the current one.

dggrid4py.tool.portable_release(line='stable')

Release tag in DGGRID_portables for a line of portable binaries.

stable and edge are the lines that dggrid4py knows. Any other value is taken as the release tag itself, e.g. edge-v91b for a development line or v8.44 for a specific DGGRID release.