Skip to main content

A thin wrapper to distribute https://github.com/cli/cli via pip.

Project description

pybin

This project was inspired by how Maturin packages rust binaries. The key observation is that in the wheel format, the distribution-1.0.data/scripts/ directory is copied to bin, which means we can leverage this to seamlessly copy binaries into a user's PATH.

Combined with Python's platform-specific wheels, this allows us to use pip as a "cross-platform package manager" for distributing single-binary CLI applications.

This is the list of tools bundled this way, which can be installed with pip install $TOOLNAME-bin.

Wheel Building Process

The core of the logic lies in the buildlib.py module.

  • A mapping from download URL (often github releases) to pypi platform tag is required.
  • For each platform:
    • Download the release & extract the binary.
    • Set file permissions and place into scripts directory within wheel archive.
    • Create the METADATA and WHEEL files within wheel archive.
    • Place wheel into dist/ folder.
  • Once all wheels are constructed, the distribution is uploaded to PyPI.

CICD is configured to automatically recognize new PyPI releases by looking for a diff on the PYPI_VERSION. When this happens, a build-and-release cycle is performed for that release version.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

gh_bin-2.62.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl (11.8 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64 musllinux: musl 1.1+ ARM64

gh_bin-2.62.0-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl (12.9 MB view details)

Uploaded Python 3 manylinux: glibc 2.12+ x86-64 musllinux: musl 1.1+ x86-64

gh_bin-2.62.0-py3-none-macosx_11_0_arm64.whl (12.4 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

gh_bin-2.62.0-py3-none-macosx_10_9_x86_64.whl (13.4 MB view details)

Uploaded Python 3 macOS 10.9+ x86-64

File details

Details for the file gh_bin-2.62.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for gh_bin-2.62.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 0dd1755f8b42c3bcb20baef4cb61822c417c9d320af8292a465a0a98fe2bed08
MD5 28ce2bfdfff8bdacb1f559a8c4911b8d
BLAKE2b-256 826efd682a5c6512a7e2caef4e05e52a19144b73cf92967a09c3e812a67a6d6d

See more details on using hashes here.

File details

Details for the file gh_bin-2.62.0-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for gh_bin-2.62.0-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 c44dc85112a673c9beb6f29d32ce32be567430ed0eef05fdad12e965bf7cf78c
MD5 89801ed8f87577ac19a0b0910ac0ffbe
BLAKE2b-256 8140ae7552a3c4d7f83b3fa2bffc56c1eb73c825f226d75a885d6f56b31ba1f5

See more details on using hashes here.

File details

Details for the file gh_bin-2.62.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gh_bin-2.62.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 66e98f8dba22bfb99be3959142628cd37bba90830d9b36f1a1ba8351d957db1b
MD5 8c087327e71a52593ea87c0495de050c
BLAKE2b-256 6bd683646a8ba99a49f1b07e718932f5d20f1f929eda5232915076f43af8edee

See more details on using hashes here.

File details

Details for the file gh_bin-2.62.0-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for gh_bin-2.62.0-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 af7118f3ce6d9c449ddcdfca4fa8dd975c13364c797f45844ff5da98169d7fe9
MD5 22dff09f343f8be62f0a3976a135068c
BLAKE2b-256 ec5fe0b36d3a2acf16a23bffdadfe0d44bfaaac4f2d5608a57532a0bff59197b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page