python310Packages.multiset: Fix build

The package has a broken python_requires version specifier, that breaks
the build with newer setuptools versions.

Convert the package to pep517 build, migrate the fetcher to an SRI hash,
and explicitly enable tests.
This commit is contained in:
Martin Weinelt
2023-03-03 23:59:32 +01:00
parent fe19a48e7b
commit 755adaaeb5
@@ -1,22 +1,38 @@
{ lib
, buildPythonPackage
, fetchPypi
, setuptools
, setuptools-scm
, pytest-runner
, pytest
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "multiset";
version = "3.0.1";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "e45671cae8385a8e6248a9b07a3a83280c2d0cc4312713058cfbacdc5ec9973e";
hash = "sha256-5FZxyug4Wo5iSKmwejqDKAwtDMQxJxMFjPus3F7Jlz4=";
};
buildInputs = [ setuptools-scm pytest-runner ];
nativeCheckInputs = [ pytest ];
nativeBuildInputs = [
setuptools
setuptools-scm
];
postPatch = ''
# Drop broken version specifier
sed -i '/python_requires/d' setup.cfg
'';
pythonImportsCheck = [
"multiset"
];
nativeCheckInputs = [
pytestCheckHook
];
meta = with lib; {
description = "An implementation of a multiset";