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.61.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.61.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.61.0-py3-none-macosx_11_0_arm64.whl (12.4 MB view details)

Uploaded Python 3 macOS 11.0+ ARM64

gh_bin-2.61.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.61.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl.

File metadata

File hashes

Hashes for gh_bin-2.61.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl
Algorithm Hash digest
SHA256 702622c22f46f858416def5d0e7750f81298a30b69c553e719e3a641485dc622
MD5 49ad5d14ab79a752a3542da80d9e91b1
BLAKE2b-256 24f6b540f5ff8c641bcbbb3f144e7366d9a559aa77a790543ae28471f6f8cd2b

See more details on using hashes here.

File details

Details for the file gh_bin-2.61.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.61.0-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 5d8c7114bd650b9cb7e415308525190f43b34d51ad4031563fdbce43bd7dc539
MD5 3040904037f09ab29ed2219a38eff1b0
BLAKE2b-256 3d5ef234adb89da8f3de8d531af8dca4b32dff4df1ed91b14c0c984f25f3c293

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gh_bin-2.61.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6b8b23a98d49cda037a775562b9821fbc71a37e4661a0894e478de8a223f5445
MD5 7fb3e450f5d8146238f76640c0f30522
BLAKE2b-256 7725187a70f253032a2ba402aa10469234be24339d09d59f2af7a94d079effc7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gh_bin-2.61.0-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1dd3a3c7c6d337e4408d7e30e17f05b55b6255c10893dc7ff9c8ca9b0eeb336e
MD5 7c5960e99c5e76c1c5368c6a12c17b83
BLAKE2b-256 8eef32272547aa9a972919ff64905d49a04c9f9bbf78a66290b5ea437a31ab8a

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