nixpkgs/pkgs/development/python-modules/plum-py/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
, baseline
, buildPythonPackage
, fetchFromGitLab
, pytestCheckHook
, pythonOlder
}:
2021-03-17 00:02:13 +00:00
buildPythonPackage rec {
pname = "plum-py";
version = "0.8.6";
format = "setuptools";
disabled = pythonOlder "3.8";
2021-03-17 00:02:13 +00:00
src = fetchFromGitLab {
owner = "dangass";
repo = "plum";
rev = "refs/tags/${version}";
hash = "sha256-gZSRqijKdjqOZe1+4aeycpCPsh6HC5sRbyVjgK+g4wM=";
2021-03-17 00:02:13 +00:00
};
postPatch = ''
# Drop broken version specifier
sed -i "/python_requires =/d" setup.cfg
'';
nativeCheckInputs = [
baseline
pytestCheckHook
];
pythonImportsCheck = [
"plum"
];
pytestFlagsArray = [
"tests"
];
2021-03-17 00:02:13 +00:00
disabledTestPaths = [
# tests enum.IntFlag behaviour which has been disallowed in python 3.11.6
# https://gitlab.com/dangass/plum/-/issues/150
"tests/flag/test_flag_invalid.py"
];
2021-03-17 00:02:13 +00:00
meta = with lib; {
description = "Classes and utilities for packing/unpacking bytes";
homepage = "https://plum-py.readthedocs.io/";
changelog = "https://gitlab.com/dangass/plum/-/blob/${version}/docs/release_notes.rst";
2021-03-17 00:02:13 +00:00
license = licenses.mit;
maintainers = with maintainers; [ dnr ];
};
}