mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 15:44:20 +00:00
755adaaeb5
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.
44 lines
771 B
Nix
44 lines
771 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, setuptools
|
|
, setuptools-scm
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "multiset";
|
|
version = "3.0.1";
|
|
format = "pyproject";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-5FZxyug4Wo5iSKmwejqDKAwtDMQxJxMFjPus3F7Jlz4=";
|
|
};
|
|
|
|
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";
|
|
homepage = "https://github.com/wheerd/multiset";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.costrouc ];
|
|
};
|
|
}
|