Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions pkgs/by-name/du/duckdb/versions.json
Original file line number Diff line number Diff line change
@@ -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="
}
11 changes: 8 additions & 3 deletions pkgs/development/python-modules/duckdb/default.nix
Comment thread
cpcloud marked this conversation as resolved.
Outdated
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
psutil,
pybind11,
setuptools-scm,
pytest-reraise,
pytestCheckHook,
}:

Expand All @@ -35,21 +36,24 @@ 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'
Comment on lines 40 to 41

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would also make a lovely upstream patch.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's probably a reason for the constraint here, and I don't have the time right now to go digging around in the DuckDB codebase/going through the processes to figure out why.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out they had some build issue that caused them to set the upper bound: duckdb/duckdb@13db15b

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out that setuptools_scm 8.0, 8.1, and 8.2 all triggered the build issue, but >= 8.3 doesn't

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, my I ask a few questions for my own understanding and learning?

Was this change necessary due to failures on a specific architecture?

When I attempted this update, I only encountered problems with test/issues/general/test_17757.test, and there was no need to modify other parts of the derivation. At least on aarch64 linux and macOS.

Additionally, there is an excluded test, which is linked to an upstream issue that has now been closed, and the test passes. When should we take care of this type of cleanup? (I'm talking about test/sql/copy/file_size_bytes.test)

'';

env = {
DUCKDB_BUILD_UNITY = 1;
OVERRIDE_GIT_DESCRIBE = "v${version}-0-g${rev}";
};

nativeBuildInputs = [
build-system = [
pybind11
setuptools-scm
];

buildInputs = [ openssl ];

propagatedBuildInputs = [
dependencies = [
numpy
pandas
];
Expand All @@ -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
Expand Down
46 changes: 46 additions & 0 deletions pkgs/development/python-modules/pytest-reraise/default.nix
Original file line number Diff line number Diff line change
@@ -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'
Comment thread
cpcloud marked this conversation as resolved.
Outdated
'';

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
'';
Comment thread
cpcloud marked this conversation as resolved.
Outdated
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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14242,6 +14242,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 { };
Expand Down