mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
Merge pull request #332747 from natsukium/dont-propagate-versioned-tree-sitter
python312Packages.tree-sitter_0_21: remove from propagated dependencies
This commit is contained in:
commit
b9f2737b66
@ -5,7 +5,10 @@
|
||||
}:
|
||||
|
||||
let
|
||||
python3 = python311;
|
||||
python3 = python311.override {
|
||||
self = python3;
|
||||
packageOverrides = _: super: { tree-sitter = super.tree-sitter_0_21; };
|
||||
};
|
||||
in
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "autotools-language-server";
|
||||
|
@ -1,14 +1,15 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, setuptools-generate
|
||||
, setuptools-scm
|
||||
, colorama
|
||||
, jinja2
|
||||
, jsonschema
|
||||
, pygls
|
||||
, tree-sitter0_21
|
||||
, pytestCheckHook
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools-generate,
|
||||
setuptools-scm,
|
||||
colorama,
|
||||
jinja2,
|
||||
jsonschema,
|
||||
pygls,
|
||||
tree-sitter,
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@ -33,16 +34,9 @@ buildPythonPackage rec {
|
||||
jinja2
|
||||
jsonschema
|
||||
pygls
|
||||
# The build won't fail if we had used tree-sitter (version > 0.21), but
|
||||
# this package is only a dependency of autotools-language-server which also
|
||||
# depends on tree-sitter-languages which must use tree-sitter0_21 and not
|
||||
# tree-sitter. Hence we avoid different tree-sitter versions dependency
|
||||
# mismatch by defaulting here to this lower version.
|
||||
tree-sitter0_21
|
||||
];
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
tree-sitter
|
||||
];
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
pythonImportsCheck = [ "lsp_tree_sitter" ];
|
||||
|
||||
|
@ -51,7 +51,8 @@ buildPythonPackage rec {
|
||||
pytestCheckHook
|
||||
syrupy
|
||||
time-machine
|
||||
] ++ lib.flatten (builtins.attrValues optional-dependencies);
|
||||
tree-sitter
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# Snapshot tests require syrupy<4
|
||||
|
@ -1,12 +1,12 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, setuptools
|
||||
, wheel
|
||||
, cython
|
||||
, tree-sitter0_21
|
||||
, pytestCheckHook
|
||||
, python
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
cython,
|
||||
tree-sitter,
|
||||
pytestCheckHook,
|
||||
python,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@ -34,20 +34,14 @@ buildPythonPackage rec {
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
wheel
|
||||
cython
|
||||
];
|
||||
dependencies = [
|
||||
# https://github.com/grantjenks/py-tree-sitter-languages/issues/67
|
||||
tree-sitter0_21
|
||||
];
|
||||
dependencies = [ tree-sitter ];
|
||||
# Generate languages.so file (build won't fail without this, but tests will).
|
||||
preBuild = ''
|
||||
${python.pythonOnBuildForHost.interpreter} build.py
|
||||
'';
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
# Without cd $out, tests fail to import the compiled cython extensions.
|
||||
# Without copying the ./tests/ directory to $out, pytest won't detect the
|
||||
# tests and run them. See also:
|
||||
@ -64,5 +58,7 @@ buildPythonPackage rec {
|
||||
homepage = "https://github.com/grantjenks/py-tree-sitter-languages";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
# https://github.com/grantjenks/py-tree-sitter-languages/issues/67
|
||||
broken = versionAtLeast tree-sitter.version "0.22";
|
||||
};
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "tree-sitter0_21";
|
||||
pname = "tree-sitter";
|
||||
version = "0.21.3";
|
||||
pyproject = true;
|
||||
|
@ -15814,7 +15814,7 @@ self: super: with self; {
|
||||
|
||||
tree-sitter = callPackage ../development/python-modules/tree-sitter { };
|
||||
|
||||
tree-sitter0_21 = callPackage ../development/python-modules/tree-sitter0_21 { };
|
||||
tree-sitter_0_21 = callPackage ../development/python-modules/tree-sitter/0_21.nix { };
|
||||
|
||||
tree-sitter-html = callPackage ../development/python-modules/tree-sitter-html { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user