Files
nixpkgs/pkgs/development/python-modules/remi/default.nix
Winter a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00

76 lines
1.7 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
setuptools,
pytestCheckHook,
matplotlib,
legacy-cgi,
python-snap7,
opencv4,
}:
buildPythonPackage rec {
pname = "remi";
version = "2022.7.27";
pyproject = true;
src = fetchFromGitHub {
owner = "rawpython";
repo = "remi";
rev = version;
hash = "sha256-VQn+Uzp6oGSit8ot0e8B0C2N41Q8+J+o91skyVN1gDA=";
};
preCheck = ''
# for some reason, REMI already deal with these using try blocks, but they fail
substituteInPlace test/test_widget.py \
--replace-fail \
"from html_validator import " \
"from .html_validator import "
substituteInPlace test/test_examples_app.py \
--replace-fail \
"from mock_server_and_request import " \
"from .mock_server_and_request import " \
--replace-fail \
"from html_validator import " \
"from .html_validator import "
# Halves number of warnings
substituteInPlace test/test_*.py \
--replace-quiet \
"self.assertEquals(" \
"self.assertEqual("
'';
build-system = [ setuptools ];
dependencies =
[
setuptools # pkg_resources is referenced at runtime
]
++ lib.optionals (!pythonOlder "3.13") [
legacy-cgi
];
nativeCheckInputs = [
pytestCheckHook
python-snap7
opencv4
matplotlib
];
pythonImportsCheck = [
"remi"
"editor"
"editor.widgets"
];
meta = {
description = "Pythonic, lightweight and websocket-based webui library";
homepage = "https://github.com/rawpython/remi";
license = with lib.licenses; [ asl20 ];
maintainers = with lib.maintainers; [ pbsds ];
};
}