python3Packages.libcst: 0.3.12 -> 0.3.13
This commit is contained in:
parent
c9c4730f11
commit
80b03e4045
|
@ -1,36 +1,43 @@
|
||||||
{ stdenv
|
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, black, isort
|
||||||
, buildPythonPackage
|
, pytestCheckHook, pyyaml, typing-extensions, typing-inspect }:
|
||||||
, fetchPypi
|
|
||||||
, typing-inspect
|
|
||||||
, pyyaml
|
|
||||||
, isPy3k
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "libcst";
|
pname = "libcst";
|
||||||
version = "0.3.12";
|
version = "0.3.13";
|
||||||
|
|
||||||
src = fetchPypi {
|
# Some files for tests missing from PyPi
|
||||||
inherit pname version;
|
# https://github.com/Instagram/LibCST/issues/331
|
||||||
sha256 = "1zgwxdbhz2ljl0yzbrn1f4f464rjphx0j6r4qq0csax3m4wp50x1";
|
src = fetchFromGitHub {
|
||||||
|
owner = "instagram";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "0pbddjrsqj641mr6zijk2phfn15dampbx268zcws4bhhhnrxlj65";
|
||||||
};
|
};
|
||||||
|
|
||||||
# The library uses type annotation syntax.
|
disabled = pythonOlder "3.6";
|
||||||
disabled = !isPy3k;
|
|
||||||
|
|
||||||
propagatedBuildInputs = [ typing-inspect pyyaml ];
|
propagatedBuildInputs = [ pyyaml typing-inspect ];
|
||||||
|
|
||||||
|
checkInputs = [ black isort pytestCheckHook ];
|
||||||
|
|
||||||
|
# https://github.com/Instagram/LibCST/issues/346
|
||||||
|
# https://github.com/Instagram/LibCST/issues/347
|
||||||
|
preCheck = ''
|
||||||
|
python -m libcst.codegen.generate visitors
|
||||||
|
python -m libcst.codegen.generate return_types
|
||||||
|
rm libcst/tests/test_fuzz.py
|
||||||
|
rm libcst/tests/test_pyre_integration.py
|
||||||
|
rm libcst/metadata/tests/test_full_repo_manager.py
|
||||||
|
rm libcst/metadata/tests/test_type_inference_provider.py
|
||||||
|
'';
|
||||||
|
|
||||||
# Test fails with ValueError: No data_provider tests were created for
|
|
||||||
# test_type_availability! Please double check your data.
|
|
||||||
# The tests appear to be doing some dynamic introspection, not sure what is
|
|
||||||
# going on there.
|
|
||||||
doCheck = false;
|
|
||||||
pythonImportsCheck = [ "libcst" ];
|
pythonImportsCheck = [ "libcst" ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
description = "A concrete syntax tree parser and serializer library for Python that preserves many aspects of Python's abstract syntax tree";
|
description =
|
||||||
homepage = "https://libcst.readthedocs.io/en/latest/";
|
"A Concrete Syntax Tree (CST) parser and serializer library for Python.";
|
||||||
|
homepage = "https://github.com/Instagram/libcst";
|
||||||
license = with licenses; [ mit asl20 psfl ];
|
license = with licenses; [ mit asl20 psfl ];
|
||||||
maintainers = [ maintainers.ruuda ];
|
maintainers = with maintainers; [ maintainers.ruuda ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue