depot/third_party/nixpkgs/pkgs/development/python-modules/pglast/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

51 lines
979 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
pythonOlder,
setuptools,
pytest,
pytest-cov-stub,
}:
buildPythonPackage rec {
pname = "pglast";
version = "6.2";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-mGP7o52Wun6AdE2jMAJBmLR10EmN50qzbMzB06BFXMg=";
};
build-system = [ setuptools ];
dependencies = [ setuptools ];
nativeCheckInputs = [
pytest
pytest-cov-stub
];
# pytestCheckHook doesn't work
# ImportError: cannot import name 'parse_sql' from 'pglast'
checkPhase = ''
pytest
'';
pythonImportsCheck = [
"pglast"
"pglast.parser"
];
meta = with lib; {
homepage = "https://github.com/lelit/pglast";
description = "PostgreSQL Languages AST and statements prettifier";
changelog = "https://github.com/lelit/pglast/blob/v${version}/CHANGES.rst";
license = licenses.gpl3Plus;
maintainers = [ ];
mainProgram = "pgpp";
};
}