Skip to content

Commit

Permalink
python312Packages.bson: enable tests (NixOS#355730)
Browse files Browse the repository at this point in the history
  • Loading branch information
FliegendeWurst authored Dec 19, 2024
2 parents a118bf0 + 3564fb9 commit 338ad16
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions pkgs/development/python-modules/bson/default.nix
Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
{
lib,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
python-dateutil,
six,
pytestCheckHook,
}:

buildPythonPackage rec {
pname = "bson";
version = "0.5.10";
format = "setuptools";

src = fetchPypi {
inherit pname version;
sha256 = "14355m3dchz446fl54ym78bn4wi20hddx1614f8rl4sin0m1nlfn";
src = fetchFromGitHub {
owner = "py-bson";
repo = "bson";
rev = "refs/tags/${version}";
hash = "sha256-mirRpo27RoOBlwxVOKnHaDIzJOErp7c2VxCOunUm/u4=";
};

postPatch = ''
find . -type f -name '*.py' -exec sed -i 's|assertEquals|assertEqual|g' {} +
'';

propagatedBuildInputs = [
python-dateutil
six
];

# 0.5.10 was not tagged, https://github.com/py-bson/bson/issues/108
doCheck = false;
checkInputs = [ pytestCheckHook ];

pythonImportsCheck = [ "bson" ];

Expand Down

0 comments on commit 338ad16

Please sign in to comment.