Skip to content

[Task][prism] Have python wrapper check and download released prism binary if available. #31403

@lostluck

Description

@lostluck

The binary zips we're putting up in GitHub release artifacts will be at URLs with the following pattern.

http://github.com/apache/beam/releases/download/RELEASE/apache_beam-RELEASE-prism-OS-ARCH.zip

This issue is the sibling to #31402.

This is with the full release version that matches the release tag. That is for version 2.57.0, the tag is v2.57.0.

Since we're building with Go os and architecture tags, we may need to translate however we detect those to match the Go build terms.

OS: windows linux darwin
ARCH: amd64 arm64

darwin is the Mac/OSX version.


Python seems to have a built in platform package where system returns a largely compatible version of the OS string (after to lowercase), and machine returns what seems to match the architecture.

This born out by another simple package (osarch), which uses these fairly simply under the hood., but doesn't return exactly what we need to fill in the download strings, so we may as well go with raw use of platform.


https://docs.python.org/3/library/zipfile.html is how zip files are handled in Python.


https://docs.python.org/3/library/urllib.request.html appears to be how to handle URL requests.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions