Compare commits

...

No commits in common. 'i10ce' and 'i10fe' have entirely different histories.
i10ce ... i10fe

@ -0,0 +1,3 @@
86d3164b4c3b6585a44cd314d23f1648e0b1e5c4 SOURCES/salsa-f608ff8b24f07706492027199f51132244034f29.tar.gz
66c09f4e6b0fbbcb9aa510ff05d3ec611dc84e84 SOURCES/ruff-0.6.7.tar.gz
252ff5ed8741bef3ab02fa995e61c1c6f8ef2231 SOURCES/lsp-types-3512a9f33eadc5402cfab1b8f7340824c8ca1439.tar.gz

4
.gitignore vendored

@ -1 +1,3 @@
SOURCES/ruff-0.4.4.tar.gz
SOURCES/salsa-f608ff8b24f07706492027199f51132244034f29.tar.gz
SOURCES/ruff-0.6.7.tar.gz
SOURCES/lsp-types-3512a9f33eadc5402cfab1b8f7340824c8ca1439.tar.gz

@ -1 +0,0 @@
35e86adf9d3d992b1150e7e574d5d689fa18ed0c SOURCES/ruff-0.4.4.tar.gz

@ -1,21 +1,36 @@
From 2cd0af69b94610b30c3563ec8cb5c8976f6d42fe Mon Sep 17 00:00:00 2001
From 6d094deb4f79d2d343bcc6c77b1c1d32cd17ede4 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Wed, 29 May 2024 21:39:59 +0200
Subject: [PATCH 1/7] drop Windows- and macOS-specific dependencies
Date: Tue, 24 Sep 2024 18:58:57 +0200
Subject: [PATCH 1/6] drop Windows- and macOS-specific dependencies
---
crates/ruff/Cargo.toml | 3 ---
crates/ruff_benchmark/Cargo.toml | 3 ---
crates/ruff_server/Cargo.toml | 3 ---
3 files changed, 9 deletions(-)
crates/red_knot_server/Cargo.toml | 3 ---
crates/ruff/Cargo.toml | 3 ---
crates/ruff_benchmark/Cargo.toml | 3 ---
crates/ruff_db/Cargo.toml | 3 ---
crates/ruff_server/Cargo.toml | 3 ---
5 files changed, 15 deletions(-)
diff --git a/crates/red_knot_server/Cargo.toml b/crates/red_knot_server/Cargo.toml
index a2bfef6..262fd4e 100644
--- a/crates/red_knot_server/Cargo.toml
+++ b/crates/red_knot_server/Cargo.toml
@@ -32,8 +32,5 @@ tracing-subscriber = { workspace = true }
[dev-dependencies]
-[target.'cfg(target_vendor = "apple")'.dependencies]
-libc = { workspace = true }
-
[lints]
workspace = true
diff --git a/crates/ruff/Cargo.toml b/crates/ruff/Cargo.toml
index 8c8ea148f..c6703c4d8 100644
index cb7e991..fb3fb93 100644
--- a/crates/ruff/Cargo.toml
+++ b/crates/ruff/Cargo.toml
@@ -68,9 +68,6 @@ insta-cmd = { workspace = true }
tempfile = { workspace = true }
test-case = { workspace = true }
@@ -76,9 +76,6 @@ test-case = { workspace = true }
# Used via macro expansion.
ignored = ["chrono"]
-[target.'cfg(target_os = "windows")'.dependencies]
-mimalloc = { workspace = true }
@ -24,10 +39,10 @@ index 8c8ea148f..c6703c4d8 100644
tikv-jemallocator = { workspace = true }
diff --git a/crates/ruff_benchmark/Cargo.toml b/crates/ruff_benchmark/Cargo.toml
index db70977c5..550166282 100644
index 9df32cd..3712134 100644
--- a/crates/ruff_benchmark/Cargo.toml
+++ b/crates/ruff_benchmark/Cargo.toml
@@ -53,8 +53,5 @@ workspace = true
@@ -62,8 +62,5 @@ workspace = true
[features]
codspeed = ["codspeed-criterion-compat"]
@ -36,11 +51,25 @@ index db70977c5..550166282 100644
-
[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64")))'.dev-dependencies]
tikv-jemallocator = { workspace = true }
diff --git a/crates/ruff_db/Cargo.toml b/crates/ruff_db/Cargo.toml
index 3410fe7..d0b4000 100644
--- a/crates/ruff_db/Cargo.toml
+++ b/crates/ruff_db/Cargo.toml
@@ -35,9 +35,6 @@ tracing-tree = { workspace = true, optional = true }
rustc-hash = { workspace = true }
zip = { workspace = true }
-[target.'cfg(target_arch="wasm32")'.dependencies]
-web-time = { version = "1.1.0" }
-
[dev-dependencies]
insta = { workspace = true }
tempfile = { workspace = true }
diff --git a/crates/ruff_server/Cargo.toml b/crates/ruff_server/Cargo.toml
index fe52e52ae..948501e20 100644
index 6f48754..83f1fa5 100644
--- a/crates/ruff_server/Cargo.toml
+++ b/crates/ruff_server/Cargo.toml
@@ -41,8 +41,5 @@ walkdir = { workspace = true }
@@ -43,8 +43,5 @@ tracing-subscriber = { workspace = true }
[dev-dependencies]
insta = { workspace = true }
@ -50,5 +79,5 @@ index fe52e52ae..948501e20 100644
[lints]
workspace = true
--
2.45.2
2.46.1

@ -1,25 +0,0 @@
From 4cd18fc4374da32a55fc689680bd17d058f34a71 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Sat, 13 Apr 2024 08:46:56 +0200
Subject: [PATCH 2/7] drop unavailable features from uuid dependency
---
Cargo.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Cargo.toml b/Cargo.toml
index d30432b1f..fdc82643d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -113,7 +113,7 @@ unicode_names2 = { version = "1.2.2" }
unicode-normalization = { version = "0.1.23" }
ureq = { version = "2.9.6" }
url = { version = "2.5.0" }
-uuid = { version = "1.6.1", features = ["v4", "fast-rng", "macro-diagnostics", "js"] }
+uuid = { version = "1.6.1", features = ["v4", "fast-rng"] }
walkdir = { version = "2.3.2" }
wasm-bindgen = { version = "0.2.92" }
wasm-bindgen-test = { version = "0.3.42" }
--
2.45.2

@ -0,0 +1,36 @@
From ac52f18aa9cef1ea255a0e95aff15b95e1d9a439 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Tue, 24 Sep 2024 19:10:11 +0200
Subject: [PATCH 2/6] replace git snapshot dependencies with path dependencies
---
Cargo.toml | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index 932a504..72cb35c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -89,9 +89,7 @@ libc = { version = "0.2.153" }
libcst = { version = "1.1.0", default-features = false }
log = { version = "0.4.17" }
lsp-server = { version = "0.7.6" }
-lsp-types = { git = "https://github.com/astral-sh/lsp-types.git", rev = "3512a9f", features = [
- "proposed",
-] }
+lsp-types = { path = "crates/lsp-types", features = ["proposed"] }
matchit = { version = "0.8.1" }
memchr = { version = "2.7.1" }
mimalloc = { version = "0.1.39" }
@@ -112,7 +110,7 @@ rand = { version = "0.8.5" }
rayon = { version = "1.10.0" }
regex = { version = "1.10.2" }
rustc-hash = { version = "2.0.0" }
-salsa = { git = "https://github.com/salsa-rs/salsa.git", rev = "f608ff8b24f07706492027199f51132244034f29" }
+salsa = { path = "crates/salsa" }
schemars = { version = "0.8.16" }
seahash = { version = "4.1.0" }
serde = { version = "1.0.197", features = ["derive"] }
--
2.46.1

@ -1,7 +1,7 @@
From 6a8b04d4aee5280fd626b2ecb9f14763c494994c Mon Sep 17 00:00:00 2001
From fa2d5f6cef59ecde008b893ce91432c8ac2a2f6c Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Wed, 29 May 2024 21:41:14 +0200
Subject: [PATCH 3/7] remove unavailable custom allocators
Date: Tue, 24 Sep 2024 19:15:00 +0200
Subject: [PATCH 3/6] remove unavailable custom allocators
---
Cargo.toml | 1 -
@ -10,24 +10,24 @@ Subject: [PATCH 3/7] remove unavailable custom allocators
3 files changed, 20 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index fdc82643d..6612fdec6 100644
index 72cb35c..115a515 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -99,7 +99,6 @@ syn = { version = "2.0.55" }
@@ -130,7 +130,6 @@ syn = { version = "2.0.55" }
tempfile = { version = "3.9.0" }
test-case = { version = "3.3.1" }
thiserror = { version = "1.0.58" }
-tikv-jemallocator = { version = "0.5.0" }
-tikv-jemallocator = { version = "0.6.0" }
toml = { version = "0.8.11" }
tracing = { version = "0.1.40" }
tracing-indicatif = { version = "0.3.6" }
tracing-flame = { version = "0.2.0" }
diff --git a/crates/ruff/Cargo.toml b/crates/ruff/Cargo.toml
index c6703c4d8..6f8e44739 100644
index fb3fb93..cdc9b78 100644
--- a/crates/ruff/Cargo.toml
+++ b/crates/ruff/Cargo.toml
@@ -68,8 +68,5 @@ insta-cmd = { workspace = true }
tempfile = { workspace = true }
test-case = { workspace = true }
@@ -76,8 +76,5 @@ test-case = { workspace = true }
# Used via macro expansion.
ignored = ["chrono"]
-[target.'cfg(all(not(target_os = "windows"), not(target_os = "openbsd"), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64")))'.dependencies]
-tikv-jemallocator = { workspace = true }
@ -35,12 +35,12 @@ index c6703c4d8..6f8e44739 100644
[lints]
workspace = true
diff --git a/crates/ruff/src/main.rs b/crates/ruff/src/main.rs
index 2f5fe9cfa..021f6fac9 100644
index 27b2fad..ef6887f 100644
--- a/crates/ruff/src/main.rs
+++ b/crates/ruff/src/main.rs
@@ -6,22 +6,6 @@ use colored::Colorize;
use ruff::args::{Args, Command};
@@ -8,22 +8,6 @@ use ruff::args::{Args, Command};
use ruff::{run, ExitStatus};
use ruff_linter::logging::{set_up_logging, LogLevel};
-#[cfg(target_os = "windows")]
-#[global_allocator]
@ -59,8 +59,8 @@ index 2f5fe9cfa..021f6fac9 100644
-static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
-
pub fn main() -> ExitCode {
let args = wild::args_os();
let mut args =
// Enabled ANSI colors on Windows 10.
#[cfg(windows)]
--
2.45.2
2.46.1

@ -1,17 +1,17 @@
From 0d8a5b5ed77fde6b96d5f1f9d17979f1a4da172e Mon Sep 17 00:00:00 2001
From e731e8acf61ca68c692ce9c023d5d066ea318b6d Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Tue, 23 Jan 2024 21:44:26 +0100
Subject: [PATCH 4/7] do not strip debuginfo from built binary executable
Date: Tue, 24 Sep 2024 19:15:29 +0200
Subject: [PATCH 4/6] do not strip debuginfo from built binary executable
---
pyproject.toml | 1 -
1 file changed, 1 deletion(-)
diff --git a/pyproject.toml b/pyproject.toml
index 276167334..ed67bc5cf 100644
index 19d0cd9..8b63fe7 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -47,7 +47,6 @@ bindings = "bin"
@@ -48,7 +48,6 @@ bindings = "bin"
manifest-path = "crates/ruff/Cargo.toml"
module-name = "ruff"
python-source = "python"
@ -20,5 +20,5 @@ index 276167334..ed67bc5cf 100644
"crates/ruff_linter/resources/test/fixtures/**/*",
"crates/ruff_linter/src/rules/*/snapshots/**/*"
--
2.45.2
2.46.1

@ -1,25 +1,25 @@
From d04fae87e624e321551e5b4ca90bf98b099c23fb Mon Sep 17 00:00:00 2001
From 9610b255fb4a2a0eb3ad08177b75135075923de2 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Sun, 26 May 2024 18:38:17 +0200
Subject: [PATCH 5/7] bump pyproject-toml-dependency from 0.9 to 0.10
Date: Tue, 24 Sep 2024 19:16:14 +0200
Subject: [PATCH 5/6] bump pyproject-toml-dependency from 0.9 to 0.11
---
Cargo.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Cargo.toml b/Cargo.toml
index 6612fdec6..2066523c7 100644
index 115a515..1aeab2b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -74,7 +74,7 @@ parking_lot = "0.12.1"
@@ -103,7 +103,7 @@ pathdiff = { version = "0.2.1" }
pep440_rs = { version = "0.6.0", features = ["serde"] }
pretty_assertions = "1.3.0"
proc-macro2 = { version = "1.0.79" }
-pyproject-toml = { version = "0.9.0" }
+pyproject-toml = { version = "0.10.0" }
quick-junit = { version = "0.4.0" }
+pyproject-toml = { version = "0.11.0" }
quick-junit = { version = "0.5.0" }
quote = { version = "1.0.23" }
rand = { version = "0.8.5" }
--
2.45.2
2.46.1

@ -1,26 +0,0 @@
From 24af9d10f80060c14933fbfafdb8a0f7c1485361 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Sun, 26 May 2024 18:42:48 +0200
Subject: [PATCH 6/7] downgrade pep440_rs from 0.6 to 0.5 to avoid duplicate
dependencies
---
Cargo.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Cargo.toml b/Cargo.toml
index 2066523c7..054a092b2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -71,7 +71,7 @@ path-absolutize = { version = "3.1.1" }
path-slash = { version = "0.2.1" }
pathdiff = { version = "0.2.1" }
parking_lot = "0.12.1"
-pep440_rs = { version = "0.6.0", features = ["serde"] }
+pep440_rs = { version = "0.5.0", features = ["serde"] }
pretty_assertions = "1.3.0"
proc-macro2 = { version = "1.0.79" }
pyproject-toml = { version = "0.10.0" }
--
2.45.2

@ -0,0 +1,25 @@
From 8f0c538a81a661cf21b7e4de94fd709e45330a97 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Tue, 24 Sep 2024 19:18:06 +0200
Subject: [PATCH 6/6] drop unavailable features from uuid dependency
---
Cargo.toml | 2 --
1 file changed, 2 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index 1aeab2b..28d4daa 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -147,8 +147,6 @@ url = { version = "2.5.0" }
uuid = { version = "1.6.1", features = [
"v4",
"fast-rng",
- "macro-diagnostics",
- "js",
] }
walkdir = { version = "2.3.2" }
wasm-bindgen = { version = "0.2.92" }
--
2.46.1

@ -1,28 +0,0 @@
From 2b7ab5050b5b74cf1bf0af6fba2f043e9740e50c Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Mon, 15 Jul 2024 08:05:07 +0200
Subject: [PATCH 7/7] Update Rust crate clap_complete_command to 0.6.0 (#12332)
Cargo.lock modifications omitted.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
Cargo.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Cargo.toml b/Cargo.toml
index 054a092b2..3e9c8a2f3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,7 +22,7 @@ bstr = { version = "1.9.1" }
cachedir = { version = "0.3.1" }
chrono = { version = "0.4.35", default-features = false, features = ["clock"] }
clap = { version = "4.5.3", features = ["derive"] }
-clap_complete_command = { version = "0.5.1" }
+clap_complete_command = { version = "0.6.0" }
clearscreen = { version = "3.0.0" }
codspeed-criterion-compat = { version = "2.6.0", default-features = false }
colored = { version = "2.1.0" }
--
2.45.2

@ -0,0 +1,41 @@
From acf56c28892d530a82912e9c2ffb6c601c9f94fd Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Tue, 24 Sep 2024 19:29:58 +0200
Subject: [PATCH] avoid duplicate workspace definitions
---
Cargo.toml | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index d3815b1..332ddaa 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,15 +17,14 @@ append-only-vec = "0.1.5"
tracing = "0.1"
parking_lot = "0.12"
rustc-hash = "2"
-salsa-macro-rules = { version = "0.1.0", path = "components/salsa-macro-rules" }
-salsa-macros = { path = "components/salsa-macros" }
+salsa-macro-rules = { version = "0.1.0", path = "../salsa-macro-rules" }
+salsa-macros = { path = "../salsa-macros" }
smallvec = "1"
lazy_static = "1"
[dev-dependencies]
annotate-snippets = "0.11.4"
derive-new = "0.6.0"
-codspeed-criterion-compat = { version = "2.6.0", default-features = false }
expect-test = "1.4.0"
eyre = "0.6.8"
notify-debouncer-mini = "0.4.1"
@@ -42,6 +41,3 @@ harness = false
[[bench]]
name = "incremental"
harness = false
-
-[workspace]
-members = ["components/salsa-macro-rules", "components/salsa-macros"]
--
2.46.1

@ -1,8 +1,8 @@
## START: Set by rpmautospec
## (rpmautospec version 0.6.5)
## (rpmautospec version 0.7.2)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 5;
release_number = 1;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
@ -13,24 +13,32 @@
# reduce peak memory usage
%constrain_build -m 4096
# replacements for git snapshot dependencies
%global lsp_types_commit 3512a9f33eadc5402cfab1b8f7340824c8ca1439
%global salsa_commit f608ff8b24f07706492027199f51132244034f29
Name: ruff
Version: 0.4.4
Version: 0.6.7
Release: %autorelease
Summary: Extremely fast Python linter and code formatter
SourceLicense: MIT
# ruff: MIT
# bundled typeshed snapshot: (Apache-2.0 AND MIT)
# bundled lsp-types fork: MIT
# bundled salsa snapshot: (Apache-2.0 OR MIT)
SourceLicense: MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
# 0BSD
# Apache-2.0
# Apache-2.0 OR BSD-2-Clause
# Apache-2.0 OR BSL-1.0
# Apache-2.0 OR MIT
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
# BSD-2-Clause OR Apache-2.0 OR MIT
# BSD-2-Clause-Views
# CC0-1.0
# ISC
# MIT
# MIT AND BSD-3-Clause
# MIT AND PSF-2.0
# MIT OR Apache-2.0
# MIT OR Apache-2.0 OR Zlib
@ -39,34 +47,51 @@ SourceLicense: MIT
# Unlicense OR MIT
# WTFPL
# Zlib OR Apache-2.0 OR MIT
License: MIT AND 0BSD AND Apache-2.0 AND BSD-2-Clause-Views AND CC0-1.0 AND ISC AND MPL-2.0 AND PSF-2.0 AND Unicode-DFS-2016 AND WTFPL AND (Apache-2.0 OR BSD-2-Clause) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR BSD-3-Clause) AND (Unlicense OR MIT)
License: MIT AND Apache-2.0 AND BSD-3-Clause AND CC0-1.0 AND ISC AND MPL-2.0 AND PSF-2.0 AND Unicode-DFS-2016 AND WTFPL AND (Apache-2.0 OR BSD-2-Clause) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR BSD-3-Clause) AND (Unlicense OR MIT)
URL: https://github.com/astral-sh/ruff
Source: %{url}/archive/v%{version}/ruff-%{version}.tar.gz
Source: %{url}/archive/%{version}/ruff-%{version}.tar.gz
Source1: https://github.com/astral-sh/lsp-types/archive/%{lsp_types_commit}/lsp-types-%{lsp_types_commit}.tar.gz
Source2: https://github.com/salsa-rs/salsa/archive/%{salsa_commit}/salsa-%{salsa_commit}.tar.gz
Source3: 0007-avoid-duplicate-workspace-definitions.patch
# * drop non-Linux dependencies (non-upstreamable), generated with:
# "for i in $(find -name Cargo.toml) ; do rust2rpm-helper strip-foreign $i -o $i ; done"
Patch: 0001-drop-Windows-and-macOS-specific-dependencies.patch
# * drop unavailable compile-time diagnostics feature for UUIDs (non-upstreamable)
Patch: 0002-drop-unavailable-features-from-uuid-dependency.patch
# * replace git snapshot dependencies with path-based dependencies from
# unpacked additional sources (non-upstreamable)
Patch: 0002-replace-git-snapshot-dependencies-with-path-dependen.patch
# * drop unavailable custom memory allocators (non-upstreamable)
Patch: 0003-remove-unavailable-custom-allocators.patch
# * do not strip debuginfo from the built executable (non-upstreamable)
Patch: 0004-do-not-strip-debuginfo-from-built-binary-executable.patch
# * bump pyproject-toml-dependency from 0.9 to 0.10:
# * bump pyproject-toml-dependency from 0.9 to 0.11 (blocked upstream):
# https://github.com/astral-sh/ruff/pull/10705
Patch: 0005-bump-pyproject-toml-dependency-from-0.9-to-0.10.patch
# * downgrade pep440_rs dependency from 0.6 to 0.5 to match pyproject-toml:
Patch: 0006-downgrade-pep440_rs-from-0.6-to-0.5-to-avoid-duplica.patch
# * Update Rust crate clap_complete_command to 0.6.0
# https://github.com/astral-sh/ruff/commit/b1cf9ea663636551cd490d74b8b82d8f778230b0
Patch: 0007-Update-Rust-crate-clap_complete_command-to-0.6.0-123.patch
# https://github.com/astral-sh/ruff/pull/11708
Patch: 0005-bump-pyproject-toml-dependency-from-0.9-to-0.11.patch
# * drop unavailable compile-time diagnostics feature for UUIDs (non-upstreamable)
Patch: 0006-drop-unavailable-features-from-uuid-dependency.patch
ExcludeArch: %{ix86}
BuildRequires: cargo-rpm-macros >= 24
BuildRequires: python3-devel
# git snapshot of the python/typeshed project at commit 9e506eb:
# https://github.com/python/typeshed
Provides: bundled(typeshed)
# forked from lsp-types upstream: https://github.com/gluon-lang/lsp-types
# with changes applied: https://github.com/astral-sh/lsp-types/tree/notebook-support
Provides: bundled(crate(lsp-types)) = 0.95.1
# git snapshot of unreleased upstream at some point after v0.18.0:
# https://github.com/salsa-rs/salsa/commit/f608ff8
Provides: bundled(crate(salsa)) = 0.18.0
Provides: bundled(crate(salsa-macros)) = 0.18.0
Provides: bundled(crate(salsa-macro-rules)) = 0.1.0
%description
An extremely fast Python linter and code formatter, written in Rust.
@ -80,7 +105,27 @@ tens or hundreds of times faster than any individual tool.
%prep
%autosetup -n ruff-%{version} -p1
%cargo_prep
# move git snapshot replacements into place
tar -xzvf %{SOURCE1}
tar -xzvf %{SOURCE2}
mv lsp-types-%{lsp_types_commit} crates/lsp-types
mv salsa-%{salsa_commit} crates/salsa
# avoid duplicate workspace definitions
pushd crates/salsa
patch -p1 < %{SOURCE3}
mv components/* ../
popd
# prepare license files under distinct names
cp -pav crates/lsp-types/LICENSE LICENSE.lsp-types
cp -pav crates/salsa/LICENSE-APACHE LICENSE-APACHE.salsa
cp -pav crates/salsa/LICENSE-MIT LICENSE-MIT.salsa
cp -pav crates/ruff_vendored/vendor/typeshed/LICENSE LICENSE.typeshed
# drop unused subprojects
rm -rv crates/red_knot_wasm
rm -rv crates/ruff_benchmark
rm -rv crates/ruff_wasm
@ -101,9 +146,9 @@ export RUSTFLAGS="%{build_rustflags}"
%pyproject_save_files ruff
# generate and install shell completions
target/rpm/ruff --generate-shell-completion bash > ruff.bash
target/rpm/ruff --generate-shell-completion fish > ruff.fish
target/rpm/ruff --generate-shell-completion zsh > _ruff
target/rpm/ruff generate-shell-completion bash > ruff.bash
target/rpm/ruff generate-shell-completion fish > ruff.fish
target/rpm/ruff generate-shell-completion zsh > _ruff
install -Dpm 0644 ruff.bash -t %{buildroot}/%{bash_completions_dir}
install -Dpm 0644 ruff.fish -t %{buildroot}/%{fish_completions_dir}
@ -119,6 +164,10 @@ export INSTA_UPDATE=always
%files -f %{pyproject_files}
%license LICENSE
%license LICENSE.lsp-types
%license LICENSE-APACHE.salsa
%license LICENSE-MIT.salsa
%license LICENSE.typeshed
%license LICENSE.dependencies
%doc README.md
%doc BREAKING_CHANGES.md
@ -132,9 +181,12 @@ export INSTA_UPDATE=always
%{zsh_completions_dir}/_ruff
%changelog
* Sun Dec 29 2024 Dmitriy Samoylik <samoylikdv@msvsphere-os.ru> - 0.6.7-1
- Rebuilt for MSVSphere 10
## START: Generated by rpmautospec
* Fri Dec 27 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 0.4.4-5
- Rebuilt for MSVSphera 10
* Sat Sep 28 2024 Fabio Valentini <decathorpe@gmail.com> - 0.6.7-1
- Update to version 0.6.7
* Mon Jul 22 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.4.4-5
- Fix typo in License expression

Loading…
Cancel
Save