diff --git a/pkgs/by-name/du/duckdb/versions.json b/pkgs/by-name/du/duckdb/versions.json index e86a40a50599..a6127ebe6d3e 100644 --- a/pkgs/by-name/du/duckdb/versions.json +++ b/pkgs/by-name/du/duckdb/versions.json @@ -1,5 +1,5 @@ { - "version": "1.2.2", - "rev": "7c039464e452ddc3330e2691d3fa6d305521d09b", - "hash": "sha256-cHQcEA9Gpza/edEVyXUYiINC/Q2b3bf+zEQbl/Otfr4=" + "version": "1.3.2", + "rev": "0b83e5d2f68bc02dfefde74b846bd039f078affa", + "hash": "sha256-6NMQ893g+nOiH8dnb63oa+fZMNXs8N6tJv+Er4x547U=" } diff --git a/pkgs/development/python-modules/duckdb/default.nix b/pkgs/development/python-modules/duckdb/default.nix index c714eb03ab04..536f08ccbe00 100644 --- a/pkgs/development/python-modules/duckdb/default.nix +++ b/pkgs/development/python-modules/duckdb/default.nix @@ -11,6 +11,7 @@ psutil, pybind11, setuptools-scm, + pytest-reraise, pytestCheckHook, }: @@ -35,6 +36,9 @@ buildPythonPackage rec { substituteInPlace setup.py \ --replace-fail "ParallelCompile()" 'ParallelCompile("NIX_BUILD_CORES")' \ --replace-fail "define_macros.extend([('DUCKDB_EXTENSION_AUTOLOAD_DEFAULT', '1'), ('DUCKDB_EXTENSION_AUTOINSTALL_DEFAULT', '1')])" "pass" + + substituteInPlace pyproject.toml \ + --replace-fail 'setuptools_scm>=6.4,<8.0' 'setuptools_scm' ''; env = { @@ -42,14 +46,14 @@ buildPythonPackage rec { OVERRIDE_GIT_DESCRIBE = "v${version}-0-g${rev}"; }; - nativeBuildInputs = [ + build-system = [ pybind11 setuptools-scm ]; buildInputs = [ openssl ]; - propagatedBuildInputs = [ + dependencies = [ numpy pandas ]; @@ -58,11 +62,12 @@ buildPythonPackage rec { fsspec google-cloud-storage psutil + pytest-reraise pytestCheckHook ]; # test flags from .github/workflows/Python.yml - pytestFlagsArray = [ "--verbose" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "tests/fast" ]; + pytestFlagsArray = [ "tests/fast" ]; disabledTestPaths = [ # avoid dependency on mypy diff --git a/pkgs/development/python-modules/pytest-reraise/default.nix b/pkgs/development/python-modules/pytest-reraise/default.nix new file mode 100644 index 000000000000..a55040017dd8 --- /dev/null +++ b/pkgs/development/python-modules/pytest-reraise/default.nix @@ -0,0 +1,46 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytest, + pytestCheckHook, + poetry-core, +}: + +buildPythonPackage rec { + pname = "pytest-reraise"; + version = "2.1.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "bjoluc"; + repo = pname; + tag = "v${version}"; + hash = "sha256-mgNKoZ+2sinArTZhSwhLxzBTb4QfiT1LWBs7w5MHXWA="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail 'poetry>=0.12' 'poetry-core>=1.0.0' \ + --replace-fail 'poetry.masonry' 'poetry.core.masonry' + ''; + + build-system = [ poetry-core ]; + + dependencies = [ pytest ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "pytest_reraise" ]; + + meta = { + description = "Make multi-threaded pytest test cases fail when they should"; + longDescription = '' + Make multi-threaded pytest test cases fail when they should + ''; + homepage = "https://github.com/bjoluc/pytest-reraise"; + changelog = "https://github.com/bjoluc/pytest-reraise/releases/tag/${src.tag}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ cpcloud ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 89bf114d0d00..f6d116bda71e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14270,6 +14270,8 @@ self: super: with self; { pytest-repeat = callPackage ../development/python-modules/pytest-repeat { }; + pytest-reraise = callPackage ../development/python-modules/pytest-reraise { }; + pytest-rerunfailures = callPackage ../development/python-modules/pytest-rerunfailures { }; pytest-resource-path = callPackage ../development/python-modules/pytest-resource-path { };