2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2022-01-19 23:45:15 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, future
|
|
|
|
, pyparsing
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bibtexparser";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "1.3.0";
|
2022-01-19 23:45:15 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sciunto-org";
|
|
|
|
repo = "python-${pname}";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-Z+opmknmgyFwvKJyvrv3MMpo23etZCn4bxGTpG5d/dY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
future
|
|
|
|
pyparsing
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/sciunto-org/python-bibtexparser/pull/259
|
|
|
|
substituteInPlace bibtexparser/tests/test_crossref_resolving.py \
|
|
|
|
--replace "import unittest2 as unittest" "import unittest"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"bibtexparser"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Bibtex parser for Python";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/sciunto-org/python-bibtexparser";
|
2022-01-19 23:45:15 +00:00
|
|
|
license = with licenses; [ lgpl3Only /* or */ bsd3 ];
|
|
|
|
maintainers = with maintainers; [ fridh ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|