mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-25 05:23:54 +00:00
python3Packages.funcparserlib: 0.3.6 -> 1.0.0a0
This commit is contained in:
parent
a4778e618f
commit
74ea9f9291
@ -1,25 +1,47 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, poetry-core
|
||||
, python
|
||||
, isPy3k
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "funcparserlib";
|
||||
version = "0.3.6";
|
||||
version = "1.0.0a0";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "b7992eac1a3eb97b3d91faa342bfda0729e990bd8a43774c1592c091e563c91d";
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vlasovskikh";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-YfcboKjyc5ASzrp0duu2R6psf51MGZIeZ0owo5QNSnU=";
|
||||
};
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} -m unittest discover
|
||||
'';
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
# Tests are Python 2.x only judging from SyntaxError
|
||||
doCheck = !(isPy3k);
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
patches = [
|
||||
# Support for poetry-core, https://github.com/vlasovskikh/funcparserlib/pull/73
|
||||
(fetchpatch {
|
||||
name = "support-poetry-core.patch";
|
||||
url = "https://github.com/vlasovskikh/funcparserlib/commit/61ed558fc146b7a30879919325dfa8aae77be556.patch";
|
||||
sha256 = "sha256-tqdR3r4/t7RWBYZeAabaN7oYf6VxkVVz006XICX9rYI=";
|
||||
})
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"funcparserlib"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Recursive descent parsing library based on functional combinators";
|
||||
@ -27,5 +49,4 @@ buildPythonPackage rec {
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user