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-01-19 23:45:15 +00:00
|
|
|
version = "1.2.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sciunto-org";
|
|
|
|
repo = "python-${pname}";
|
|
|
|
rev = "v${version}";
|
2022-01-19 23:45:15 +00:00
|
|
|
hash = "sha256-M9fDI28Yq0uUHPx51wiuRPmRTLkjVqj7ixapbSftnJc=";
|
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
|
|
|
};
|
|
|
|
}
|