mirror of
https://github.com/ivabus/pantry
synced 2024-11-29 19:55:06 +03:00
3596398664
closes #4911 closes #4912
41 lines
1 KiB
YAML
41 lines
1 KiB
YAML
distributable:
|
|
url: https://github.com/astral-sh/ruff/archive/refs/tags/v{{version}}.tar.gz
|
|
strip-components: 1
|
|
|
|
versions:
|
|
github: astral-sh/ruff
|
|
strip: /^v /
|
|
|
|
build:
|
|
dependencies:
|
|
rust-lang.org: '>=1.60'
|
|
rust-lang.org/cargo: '*'
|
|
crates.io/semverator: '*'
|
|
script: |
|
|
if semverator lt {{version}} 0.0.242; then
|
|
CRATE=ruff_cli
|
|
elif semverator lt {{version}} 0.1.14; then
|
|
CRATE=crates/ruff_cli
|
|
else
|
|
CRATE=crates/ruff
|
|
fi
|
|
cargo install --locked --path $CRATE --root {{prefix}}
|
|
|
|
renamed-to: astral.sh/ruff
|
|
|
|
# provides:
|
|
# - bin/ruff
|
|
|
|
test:
|
|
script:
|
|
# v0.1.12 introduced this test error:
|
|
# ruff failed
|
|
# Cause: Failed to create cache file '/__w/pantry/pantry/testbeds/github.com__charliermarsh__ruff-0.1.12/.ruff_cache/0.1.12/10391082687706843805'
|
|
# Cause: No such file or directory (os error 2)
|
|
- run: mkdir -p .ruff_cache/{{version}}
|
|
if: '>=0.1.12'
|
|
- ruff -e $FIXTURE | grep "\`os\` imported but unused"
|
|
- ruff --fix $FIXTURE
|
|
- test ! -s $FIXTURE
|
|
fixture: |
|
|
import os
|