Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.bson: enable tests #355730

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading