Merge pull request #299965 from fabaff/blockdiag-refactor

python312Packages.{blockdiag,actdiag,nwdiag,seqdiag}: refactor
This commit is contained in:
Fabian Affolter 2024-03-29 18:17:17 +01:00 committed by GitHub
commit b0654b1201
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 63 additions and 45 deletions

View File

@ -2,7 +2,7 @@
, blockdiag , blockdiag
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, nose , pynose
, pytestCheckHook , pytestCheckHook
, pythonOlder , pythonOlder
, setuptools , setuptools
@ -11,24 +11,27 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "actdiag"; pname = "actdiag";
version = "3.0.0"; version = "3.0.0";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "blockdiag"; owner = "blockdiag";
repo = pname; repo = "actdiag";
rev = version; rev = "refs/tags/${version}";
hash = "sha256-WmprkHOgvlsOIg8H77P7fzEqxGnj6xaL7Df7urRkg3o="; hash = "sha256-WmprkHOgvlsOIg8H77P7fzEqxGnj6xaL7Df7urRkg3o=";
}; };
propagatedBuildInputs = [ build-system = [
blockdiag
setuptools setuptools
]; ];
propagatedBuildInputs = [
blockdiag
];
nativeCheckInputs = [ nativeCheckInputs = [
nose pynose
pytestCheckHook pytestCheckHook
]; ];
@ -36,16 +39,23 @@ buildPythonPackage rec {
"src/actdiag/tests/" "src/actdiag/tests/"
]; ];
disabledTests = [
# AttributeError: 'TestRstDirectives' object has no attribute 'assertRegexpMatches'
"svg"
"noviewbox"
];
pythonImportsCheck = [ pythonImportsCheck = [
"actdiag" "actdiag"
]; ];
meta = with lib; { meta = with lib; {
description = "Generate activity-diagram image from spec-text file (similar to Graphviz)"; description = "Generate activity-diagram image from spec-text file (similar to Graphviz)";
mainProgram = "actdiag";
homepage = "http://blockdiag.com/"; homepage = "http://blockdiag.com/";
changelog = "https://github.com/blockdiag/actdiag/blob/${version}/CHANGES.rst";
license = licenses.asl20; license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ bjornfor ]; maintainers = with maintainers; [ bjornfor ];
mainProgram = "actdiag";
platforms = platforms.unix;
}; };
} }

View File

@ -1,31 +1,30 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, docutils , docutils
, ephem
, fetchFromGitHub , fetchFromGitHub
, fetchpatch , fetchpatch
, funcparserlib , funcparserlib
, nose
, pillow , pillow
, ephem , pynose
, pythonOlder
, pytestCheckHook , pytestCheckHook
, pythonOlder
, reportlab , reportlab
, setuptools , setuptools
, webcolors , webcolors
, python
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "blockdiag"; pname = "blockdiag";
version = "3.0.0"; version = "3.0.0";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "blockdiag"; owner = "blockdiag";
repo = "blockdiag"; repo = "blockdiag";
rev = version; rev = "refs/tags/${version}";
hash = "sha256-j8FoNUIJJOaahaol1MRPyY2jcPCEIlaAD4bmM2QKFFI="; hash = "sha256-j8FoNUIJJOaahaol1MRPyY2jcPCEIlaAD4bmM2QKFFI=";
}; };
@ -38,18 +37,21 @@ buildPythonPackage rec {
}) })
]; ];
propagatedBuildInputs = [ build-system = [
setuptools setuptools
];
dependencies = [
docutils
funcparserlib funcparserlib
pillow pillow
webcolors
reportlab reportlab
docutils webcolors
]; ];
nativeCheckInputs = [ nativeCheckInputs = [
ephem ephem
nose pynose
pytestCheckHook pytestCheckHook
]; ];
@ -68,10 +70,11 @@ buildPythonPackage rec {
meta = with lib; { meta = with lib; {
description = "Generate block-diagram image from spec-text file (similar to Graphviz)"; description = "Generate block-diagram image from spec-text file (similar to Graphviz)";
mainProgram = "blockdiag";
homepage = "http://blockdiag.com/"; homepage = "http://blockdiag.com/";
changelog = "https://github.com/blockdiag/blockdiag/blob/${version}/CHANGES.rst";
license = licenses.asl20; license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ bjornfor ]; maintainers = with maintainers; [ bjornfor ];
mainProgram = "blockdiag";
platforms = platforms.unix;
}; };
} }

View File

@ -2,7 +2,7 @@
, blockdiag , blockdiag
, fetchFromGitHub , fetchFromGitHub
, buildPythonPackage , buildPythonPackage
, nose , pynose
, pytestCheckHook , pytestCheckHook
, setuptools , setuptools
, pythonOlder , pythonOlder
@ -11,24 +11,27 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "nwdiag"; pname = "nwdiag";
version = "3.0.0"; version = "3.0.0";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "blockdiag"; owner = "blockdiag";
repo = pname; repo = "nwdiag";
rev = version; rev = "refs/tags/${version}";
hash = "sha256-uKrdkXpL5YBr953sRsHknYg+2/WwrZmyDf8BMA2+0tU="; hash = "sha256-uKrdkXpL5YBr953sRsHknYg+2/WwrZmyDf8BMA2+0tU=";
}; };
propagatedBuildInputs = [ build-system = [
blockdiag
setuptools setuptools
]; ];
dependencies = [
blockdiag
];
nativeCheckInputs = [ nativeCheckInputs = [
nose pynose
pytestCheckHook pytestCheckHook
]; ];
@ -37,8 +40,9 @@ buildPythonPackage rec {
]; ];
disabledTests = [ disabledTests = [
# UnicodeEncodeError: 'latin-1' codec can't encode... # AttributeError: 'TestRstDirectives' object has no attribute 'assertRegexpMatches'
"test_setup_inline_svg_is_true_with_multibytes" "svg"
"noviewbox"
]; ];
pythonImportsCheck = [ pythonImportsCheck = [
@ -48,8 +52,10 @@ buildPythonPackage rec {
meta = with lib; { meta = with lib; {
description = "Generate network-diagram image from spec-text file (similar to Graphviz)"; description = "Generate network-diagram image from spec-text file (similar to Graphviz)";
homepage = "http://blockdiag.com/"; homepage = "http://blockdiag.com/";
changelog = "https://github.com/blockdiag/nwdiag/blob/${version}/CHANGES.rst";
license = licenses.asl20; license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ bjornfor ]; maintainers = with maintainers; [ bjornfor ];
mainProgram = "rackdiag";
platforms = platforms.unix;
}; };
} }

View File

@ -2,7 +2,7 @@
, blockdiag , blockdiag
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, nose , pynose
, pytestCheckHook , pytestCheckHook
, pythonOlder , pythonOlder
, setuptools , setuptools
@ -11,24 +11,27 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "seqdiag"; pname = "seqdiag";
version = "3.0.0"; version = "3.0.0";
format = "setuptools"; pyproject = true;
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "blockdiag"; owner = "blockdiag";
repo = pname; repo = "seqdiag";
rev = version; rev = "refs/tags/${version}";
hash = "sha256-Dh9JMx50Nexi0q39rYr9MpkKmQRAfT7lzsNOXoTuphg="; hash = "sha256-Dh9JMx50Nexi0q39rYr9MpkKmQRAfT7lzsNOXoTuphg=";
}; };
propagatedBuildInputs = [ build-system = [
blockdiag
setuptools setuptools
]; ];
dependencies = [
blockdiag
];
nativeCheckInputs = [ nativeCheckInputs = [
nose pynose
pytestCheckHook pytestCheckHook
]; ];
@ -36,21 +39,17 @@ buildPythonPackage rec {
"src/seqdiag/tests/" "src/seqdiag/tests/"
]; ];
disabledTests = [
# UnicodeEncodeError: 'latin-1' codec can't encode...
"test_setup_inline_svg_is_true_with_multibytes"
];
pythonImportsCheck = [ pythonImportsCheck = [
"seqdiag" "seqdiag"
]; ];
meta = with lib; { meta = with lib; {
description = "Generate sequence-diagram image from spec-text file (similar to Graphviz)"; description = "Generate sequence-diagram image from spec-text file (similar to Graphviz)";
mainProgram = "seqdiag";
homepage = "http://blockdiag.com/"; homepage = "http://blockdiag.com/";
changelog = "https://github.com/blockdiag/seqdiag/blob/${version}/CHANGES.rst";
license = licenses.asl20; license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ bjornfor ]; maintainers = with maintainers; [ bjornfor ];
mainProgram = "seqdiag";
platforms = platforms.unix;
}; };
} }