python38Packages.pglast: 1.17 -> 3.0

This commit is contained in:
Mario Rodas 2021-06-04 04:20:00 +00:00
parent afdb5675a1
commit 6f60530fa6

View file

@ -1,29 +1,33 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, isPy3k
, pythonOlder
, setuptools
, aenum
, pytest
, pytestcov
, pytest
}:
buildPythonPackage rec {
pname = "pglast";
version = "1.17";
version = "3.0";
src = fetchPypi {
inherit pname version;
sha256 = "2979b38ca5f72cfa0a5db78af2f62d04db6a7647ee7f03eac7a67f9e86e3f5f9";
# PyPI tarball does not include all the required files
src = fetchFromGitHub {
owner = "lelit";
repo = pname;
rev = "v${version}";
fetchSubmodules = true;
sha256 = "0yi24wj19rzw5dvppm8g3hnfskyzbrqw14q8x9f2q5zi8g6xnnrd";
};
disabled = !isPy3k;
propagatedBuildInputs = [ setuptools ] ++ lib.optionals (pythonOlder "3.6") [ aenum ];
propagatedBuildInputs = [ setuptools ];
checkInputs = [ pytest pytestcov ];
pythonImportsCheck = [ "pglast" ];
checkPhase = ''
pytest
'';
@ -31,6 +35,7 @@ buildPythonPackage rec {
meta = with lib; {
homepage = "https://github.com/lelit/pglast";
description = "PostgreSQL Languages AST and statements prettifier";
changelog = "https://github.com/lelit/pglast/raw/v${version}/CHANGES.rst";
license = licenses.gpl3Plus;
maintainers = [ maintainers.marsam ];
};