python312Packages.widlparser: refactor
This commit is contained in:
@@ -4,28 +4,44 @@
|
||||
fetchFromGitHub,
|
||||
pythonOlder,
|
||||
# build inputs
|
||||
setuptools,
|
||||
setuptools-scm,
|
||||
typing-extensions,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "widlparser";
|
||||
version = "1.1.5";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "plinss";
|
||||
repo = pname;
|
||||
repo = "widlparser";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-G5N29K0/ByfKwP1XfxZH9u/5x361JD/8qAD6eZaySnU=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ typing-extensions ];
|
||||
dependencies = [ typing-extensions ];
|
||||
|
||||
pythonImportsCheck = [ "widlparser" ];
|
||||
|
||||
# https://github.com/plinss/widlparser/blob/v1.1.5/.github/workflows/test.yml
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
python test.py > test-actual.txt
|
||||
diff -u test-expected.txt test-actual.txt
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Stand-alone WebIDL Parser in Python";
|
||||
homepage = "https://github.com/plinss/widlparser";
|
||||
|
||||
Reference in New Issue
Block a user