-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: add Windows support with standalone binary (#474)
This change provides Windows support with a standalone binary included as a new release artifact. This is the implementation of the research spike in #472, which settled on `nuitka` for generating the binary. The binary is created with [Nuitka](https://nuitka.net) as a single file and included as an additional release artifact. The file is a self-extracting executable that expands to a version-specific user cache directory and runs from there, saving startup time for subsequent runs. Unlike other install options, this one does not require Python on the system to run. Like other supported platforms, if an existing supported instance of the Phylum CLI is not found on the system, the latest Windows binary CLI is downloaded and placed in the same self-extracted cache directory used by the phylum-ci binary. This allows for reduced prerequisites and better testing. Additional changes made include: * Add a new Poetry dependency group named `compile` * Break up `Release` workflow into separate jobs * A build job to create the Python distributions * A build job to create the Windows binary * A release job to create/publish the GitHub release and Docker images * Update the `Preview` workflow to add option to create Windows binary * Add a Phylum `favicon.ico` to allow the binary to have an icon * Ensure internal calls to `phylum-init` don't reset log level * Ensure all `subprocess.run` commands are cross-platform compatible * Specify `encoding` and `errors` where it matters * Add ability to bypass full CI detection * Set `PHYLUM_BYPASS_CI_DETECTION` envvar to get `CINone` instead * Helpful for testing while still providing basic functionality * Allow `phylum-init` to use a release candidate when `latest` specified * This only happens when `latest` is not a supported version * Add method for ensuring the Phylum settings file is always populated * Account for Windows device drive prefix (e.g., `\\?\`) in paths * Ensure internal `ci` extension has cross-platform read permissions set * Add new installation method to README * Update tests * Refactor and format throughout * Use envvar instead of matrix to define Python version in workflows * Use GitHub step and job outputs to pass information in workflows * Reduce verbosity on `python-semantic-release` calls in workflows * Update log messages * Add missing type hints to `src/phylum/init/cli.py` * Remove `rich` markup emojis from log entries BREAKING CHANGE: Phylum CLI installs before v7.1.0-rc1 are no longer supported. That release is the first one providing full Windows support.
- Loading branch information
Showing
27 changed files
with
838 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.