-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Problem description
Hello,
First of all, thank you for this project! This is finally a nice, working, and configurable TOML formatter usable as a pre-commit hook.
On local machines, everything works great, but we also have a GitLab CI job with pre-commit to ensure the codebase is formatted even if developers forget to install pre-commit in the repo on their local machines.
This CI job uses an Alpine Docker image (python:3.11-alpine3.18), and currently, it is failing with:
[INFO] Installing environment for https://github.com/ComPWA/mirrors-taplo.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/root/.cache/pre-commit/reporohe5gkc/py_env-python3.11/bin/python', '-mpip', 'install', '.')
return code: 1
stdout:
Processing /root/.cache/pre-commit/reporohe5gkc
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting taplo==0.9.3 (from pre_commit_placeholder_package==0.0.0)
Downloading taplo-0.9.3.tar.gz (102 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 102.6/102.6 kB 4.2 MB/s eta 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
stderr:
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Cargo, the Rust package manager, is not installed or is not on PATH.
This package requires Rust and Cargo to compile extensions. Install it through
the system's package manager or via https://rustup.rs/
Checking for Rust toolchain....
[end of output]The issue here, I believe, is the missing Python wheel for Alpine Linux (musl), so the installer tries to compile it from source and fails.
Right now due to missing Alpine support, we can't add https://github.com/ComPWA/mirrors-taplo to our standard hooks for all projects, which I would very much like to do.
Proposed solution
Is it possible to add and maintain support for Alpine Linux?
(Alpine Linux is widely used for CI, and many people could benefit from this.)
What should the interface look like?
No response
Additional context
No response