Merge pull request #112908 from mweinelt/python/astroid
python3Packages.astroid: 2.4.2 -> 2.5.0
This commit is contained in:
commit
14674ebc0a
@ -1,34 +1,39 @@
|
|||||||
{ lib, fetchPypi, buildPythonPackage, pythonOlder, isPyPy, pythonAtLeast
|
{ lib
|
||||||
, lazy-object-proxy, six, wrapt, typing, typed-ast
|
, buildPythonPackage
|
||||||
, pytestrunner, pytest
|
, fetchPypi
|
||||||
|
, pythonOlder
|
||||||
|
, isPyPy
|
||||||
|
, lazy-object-proxy
|
||||||
|
, wrapt
|
||||||
|
, typed-ast
|
||||||
|
, pytestCheckHook
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "astroid";
|
pname = "astroid";
|
||||||
version = "2.4.2";
|
version = "2.5";
|
||||||
|
|
||||||
disabled = pythonOlder "3.4" || pythonAtLeast "3.9";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703";
|
sha256 = "03dzhjrsc5d2whyjngfrwvxn42058k0cjjr85x2wqzai8psr475k";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace astroid/__pkginfo__.py --replace "lazy_object_proxy==1.4.*" "lazy_object_proxy"
|
|
||||||
'';
|
|
||||||
|
|
||||||
# From astroid/__pkginfo__.py
|
# From astroid/__pkginfo__.py
|
||||||
propagatedBuildInputs = [ lazy-object-proxy six wrapt ]
|
propagatedBuildInputs = [
|
||||||
++ lib.optional (pythonOlder "3.5") typing
|
lazy-object-proxy
|
||||||
++ lib.optional (!isPyPy) typed-ast;
|
wrapt
|
||||||
|
] ++ lib.optional (!isPyPy && pythonOlder "3.8") typed-ast;
|
||||||
|
|
||||||
checkInputs = [ pytestrunner pytest ];
|
checkInputs = [
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "An abstract syntax tree for Python with inference support";
|
description = "An abstract syntax tree for Python with inference support";
|
||||||
homepage = "https://github.com/PyCQA/astroid";
|
homepage = "https://github.com/PyCQA/astroid";
|
||||||
license = licenses.lgpl2;
|
license = licenses.lgpl21Plus;
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
maintainers = with maintainers; [ nand0p ];
|
maintainers = with maintainers; [ nand0p ];
|
||||||
};
|
};
|
||||||
|
@ -1,50 +1,69 @@
|
|||||||
{ stdenv, lib, buildPythonPackage, fetchPypi, pythonOlder, astroid, installShellFiles,
|
{ stdenv
|
||||||
isort, mccabe, pytestCheckHook, pytest-benchmark, pytestrunner, toml }:
|
, lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, pythonOlder
|
||||||
|
, installShellFiles
|
||||||
|
, astroid
|
||||||
|
, isort
|
||||||
|
, mccabe
|
||||||
|
, toml
|
||||||
|
, pytest-benchmark
|
||||||
|
, pytest-xdist
|
||||||
|
, pytestCheckHook
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pylint";
|
pname = "pylint";
|
||||||
version = "2.6.2";
|
version = "2.7.1";
|
||||||
|
|
||||||
disabled = pythonOlder "3.5";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "sha256-cYt0eG6n7QeqDFi/VyFU1Geflg0m6WQcwd4gSjC4f8k=";
|
sha256 = "10nrvzk1naf5ryawmi59wp99k31053sz37q3x9li2hj2cf7i1kl1";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pytestrunner installShellFiles ];
|
nativeBuildInputs = [
|
||||||
|
installShellFiles
|
||||||
|
];
|
||||||
|
|
||||||
checkInputs = [ pytestCheckHook pytest-benchmark ];
|
propagatedBuildInputs = [
|
||||||
|
astroid
|
||||||
|
isort
|
||||||
|
mccabe
|
||||||
|
toml
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [ astroid isort mccabe toml ];
|
postInstall = ''
|
||||||
|
mkdir -p $out/share/emacs/site-lisp
|
||||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
cp -v "elisp/"*.el $out/share/emacs/site-lisp/
|
||||||
# Remove broken darwin test
|
installManPage man/*.1
|
||||||
rm -vf pylint/test/test_functional.py
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
disabledTests = [
|
checkInputs = [
|
||||||
# https://github.com/PyCQA/pylint/issues/3198
|
pytest-benchmark
|
||||||
"test_by_module_statement_value"
|
pytest-xdist
|
||||||
# has issues with local directories
|
pytestCheckHook
|
||||||
"test_version"
|
];
|
||||||
] ++ lib.optionals stdenv.isDarwin [
|
|
||||||
"test_parallel_execution"
|
dontUseSetuptoolsCheck = true;
|
||||||
"test_py3k_jobs_option"
|
|
||||||
];
|
|
||||||
|
|
||||||
# calls executable in one of the tests
|
# calls executable in one of the tests
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
export PATH=$PATH:$out/bin
|
export PATH=$PATH:$out/bin
|
||||||
'';
|
'';
|
||||||
|
|
||||||
dontUseSetuptoolsCheck = true;
|
pytestFlagsArray = [
|
||||||
|
"-n auto"
|
||||||
|
];
|
||||||
|
|
||||||
postInstall = ''
|
disabledTests = lib.optionals stdenv.isDarwin [
|
||||||
mkdir -p $out/share/emacs/site-lisp
|
"test_parallel_execution"
|
||||||
cp "elisp/"*.el $out/share/emacs/site-lisp/
|
"test_py3k_jobs_option"
|
||||||
installManPage man/*.1
|
];
|
||||||
'';
|
|
||||||
|
disabledTestPaths = lib.optional stdenv.isDarwin "pylint/test/test_functional.py";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://pylint.pycqa.org/";
|
homepage = "https://pylint.pycqa.org/";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user