mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
black: 25.1.0 -> 26.5.1
https://github.com/psf/black/blob/26.5.1/CHANGES.md
This commit is contained in:
parent
292f1bcbd4
commit
cafee09a90
1 changed files with 15 additions and 33 deletions
|
|
@ -2,8 +2,7 @@
|
|||
stdenv,
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchpatch,
|
||||
fetchFromGitHub,
|
||||
pytestCheckHook,
|
||||
aiohttp,
|
||||
click,
|
||||
|
|
@ -17,50 +16,36 @@
|
|||
pathspec,
|
||||
parameterized,
|
||||
platformdirs,
|
||||
pytokens,
|
||||
tokenize-rt,
|
||||
uvloop,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "black";
|
||||
version = "25.1.0";
|
||||
version = "26.5.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-M0ltXNEiKtczkTUrSujaFSU8Xeibk6gLPiyNmhnsJmY=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "psf";
|
||||
repo = "black";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-xALg9ta0U2V6i/b7VYiPKu0oNnHfg9T+XuK3CvqJmjs=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "click-8.2-compat-1.patch";
|
||||
url = "https://github.com/psf/black/commit/14e1de805a5d66744a08742cad32d1660bf7617a.patch";
|
||||
hash = "sha256-fHRlMetE6+09MKkuFNQQr39nIKeNrqwQuBNqfIlP4hc=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "click-8.2-compat-2.patch";
|
||||
url = "https://github.com/psf/black/commit/ed64d89faa7c738c4ba0006710f7e387174478af.patch";
|
||||
hash = "sha256-df/J6wiRqtnHk3mAY3ETiRR2G4hWY1rmZMfm2rjP2ZQ=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "click-8.2-compat-3.patch";
|
||||
url = "https://github.com/psf/black/commit/b0f36f5b4233ef4cf613daca0adc3896d5424159.patch";
|
||||
hash = "sha256-SGLCxbgrWnAi79IjQOb2H8mD/JDbr2SGfnKyzQsJrOA=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
build-system = [
|
||||
hatch-fancy-pypi-readme
|
||||
hatch-vcs
|
||||
hatchling
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
click
|
||||
mypy-extensions
|
||||
packaging
|
||||
pathspec
|
||||
platformdirs
|
||||
pytokens
|
||||
];
|
||||
|
||||
optional-dependencies = {
|
||||
|
|
@ -81,7 +66,7 @@ buildPythonPackage rec {
|
|||
pytestCheckHook
|
||||
parameterized
|
||||
]
|
||||
++ lib.concatAttrValues optional-dependencies;
|
||||
++ lib.concatAttrValues finalAttrs.passthru.optional-dependencies;
|
||||
|
||||
pytestFlags = [
|
||||
"-Wignore::DeprecationWarning"
|
||||
|
|
@ -102,9 +87,6 @@ buildPythonPackage rec {
|
|||
disabledTests = [
|
||||
# requires network access
|
||||
"test_gen_check_output"
|
||||
# broken on Python 3.13.4
|
||||
# FIXME: remove this when fixed upstream
|
||||
"test_simple_format[pep_701]"
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# fails on darwin
|
||||
|
|
@ -119,7 +101,7 @@ buildPythonPackage rec {
|
|||
meta = {
|
||||
description = "Uncompromising Python code formatter";
|
||||
homepage = "https://github.com/psf/black";
|
||||
changelog = "https://github.com/psf/black/blob/${version}/CHANGES.md";
|
||||
changelog = "https://github.com/psf/black/blob/${finalAttrs.src.tag}/CHANGES.md";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "black";
|
||||
maintainers = with lib.maintainers; [
|
||||
|
|
@ -127,4 +109,4 @@ buildPythonPackage rec {
|
|||
autophagy
|
||||
];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue