python310Packages.pglast: disable on older Python releases
This commit is contained in:
parent
f35a9cf967
commit
21693b099b
|
@ -1,7 +1,7 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, isPy3k
|
||||
, pythonOlder
|
||||
, setuptools
|
||||
, pytest
|
||||
}:
|
||||
|
@ -9,23 +9,27 @@
|
|||
buildPythonPackage rec {
|
||||
pname = "pglast";
|
||||
version = "3.10";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-rkoCtcBe5LBTTpmd+cj6s80UWXyTpMk74FipyK0t5go=";
|
||||
hash = "sha256-rkoCtcBe5LBTTpmd+cj6s80UWXyTpMk74FipyK0t5go=";
|
||||
};
|
||||
|
||||
disabled = !isPy3k;
|
||||
|
||||
# ModuleNotFoundError: No module named 'pkg_resources'
|
||||
propagatedBuildInputs = [ setuptools ];
|
||||
propagatedBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "--cov=pglast --cov-report term-missing" ""
|
||||
'';
|
||||
|
||||
checkInputs = [ pytest ];
|
||||
checkInputs = [
|
||||
pytest
|
||||
];
|
||||
|
||||
# pytestCheckHook doesn't work
|
||||
# ImportError: cannot import name 'parse_sql' from 'pglast'
|
||||
|
@ -38,6 +42,6 @@ buildPythonPackage rec {
|
|||
description = "PostgreSQL Languages AST and statements prettifier";
|
||||
changelog = "https://github.com/lelit/pglast/raw/v${version}/CHANGES.rst";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = [ maintainers.marsam ];
|
||||
maintainers = with maintainers; [ marsam ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue