Skip to content

Commit 5e57e4e

Browse files
authored
python312Packages.loopy: 2024.1 -> 2025.1 (#404179)
2 parents c31d6cf + 7585a99 commit 5e57e4e

File tree

3 files changed

+90
-27
lines changed

3 files changed

+90
-27
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchFromGitHub,
5+
hatchling,
6+
pytestCheckHook,
7+
}:
8+
9+
buildPythonPackage rec {
10+
pname = "constantdict";
11+
version = "2025.1.1";
12+
pyproject = true;
13+
14+
src = fetchFromGitHub {
15+
owner = "matthiasdiener";
16+
repo = "constantdict";
17+
tag = "v${version}";
18+
hash = "sha256-M3duCafyJk/W3KIqP43ErXr/EfCj6/Sin6eCaaxyI5g=";
19+
};
20+
21+
build-system = [
22+
hatchling
23+
];
24+
25+
pythonImportsCheck = [
26+
"constantdict"
27+
];
28+
29+
# Assumes that unpickling a pickled dict in a different Python process will result in a different hash.
30+
# This doesn't seem to work in the Nix sandbox but works fine in a normal environment.
31+
disabledTests = [
32+
"test_pickle_hash"
33+
];
34+
35+
nativeCheckInputs = [ pytestCheckHook ];
36+
37+
meta = {
38+
homepage = "https://matthiasdiener.github.io/constantdict";
39+
downloadPage = "https://github.com/matthiasdiener/constantdict";
40+
description = "Immutable dictionary class for Python, implemented as a thin layer around Python's builtin dict class";
41+
changelog = "https://github.com/matthiasdiener/constantdict/releases/tag/${src.tag}";
42+
license = lib.licenses.mit;
43+
maintainers = with lib.maintainers; [ qbisi ];
44+
};
45+
}

pkgs/development/python-modules/loopy/default.nix

Lines changed: 43 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,75 @@
11
{
22
lib,
3+
stdenv,
34
buildPythonPackage,
4-
codepy,
5-
cgen,
6-
colorama,
5+
pythonOlder,
76
fetchFromGitHub,
7+
writableTmpDirAsHomeHook,
8+
9+
# build-system
10+
hatchling,
11+
12+
# dependencies
13+
pytools,
14+
pymbolic,
815
genpy,
9-
immutables,
16+
numpy,
17+
cgen,
1018
islpy,
19+
codepy,
20+
colorama,
1121
mako,
12-
numpy,
13-
pymbolic,
14-
pyopencl,
15-
pyrsistent,
16-
pythonOlder,
17-
pytools,
18-
setuptools,
22+
constantdict,
1923
typing-extensions,
24+
25+
# optional-dependencies
26+
pyopencl,
27+
fparser,
28+
ply,
2029
}:
2130

2231
buildPythonPackage rec {
2332
pname = "loopy";
24-
version = "2024.1";
33+
version = "2025.1";
2534
pyproject = true;
2635

27-
disabled = pythonOlder "3.8";
36+
disabled = pythonOlder "3.10";
2837

2938
src = fetchFromGitHub {
3039
owner = "inducer";
3140
repo = "loopy";
3241
tag = "v${version}";
33-
hash = "sha256-mU8vXEPR88QpJpzXZlZdDhMtlwIx5YpeYhXU8Vw2T9g=";
42+
hash = "sha256-3Ebnje+EBw2Jdp2xLqffWx592OoUrSdRDXQkw6FpEzc=";
3443
fetchSubmodules = true; # submodule at `loopy/target/c/compyte`
3544
};
3645

37-
build-system = [ setuptools ];
46+
build-system = [ hatchling ];
47+
48+
nativeBuildInputs = [ writableTmpDirAsHomeHook ];
3849

3950
dependencies = [
40-
codepy
41-
cgen
42-
colorama
51+
pytools
52+
pymbolic
4353
genpy
44-
immutables
54+
numpy
55+
cgen
4556
islpy
57+
codepy
58+
colorama
4659
mako
47-
numpy
48-
pymbolic
49-
pyopencl
50-
pyrsistent
51-
pytools
60+
constantdict
5261
typing-extensions
5362
];
5463

55-
postConfigure = ''
56-
export HOME=$(mktemp -d)
57-
'';
64+
optional-dependencies = {
65+
pyopencl = [
66+
pyopencl
67+
];
68+
fortran = [
69+
fparser
70+
ply
71+
];
72+
};
5873

5974
pythonImportsCheck = [ "loopy" ];
6075

@@ -64,6 +79,7 @@ buildPythonPackage rec {
6479
meta = {
6580
description = "Code generator for array-based code on CPUs and GPUs";
6681
homepage = "https://github.com/inducer/loopy";
82+
changelog = "https://github.com/inducer/loopy/releases/tag/${src.tag}";
6783
license = lib.licenses.mit;
6884
maintainers = with lib.maintainers; [ tomasajt ];
6985
};

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2803,6 +2803,8 @@ self: super: with self; {
28032803

28042804
consonance = callPackage ../development/python-modules/consonance { };
28052805

2806+
constantdict = callPackage ../development/python-modules/constantdict { };
2807+
28062808
constantly = callPackage ../development/python-modules/constantly { };
28072809

28082810
construct = callPackage ../development/python-modules/construct { };

0 commit comments

Comments
 (0)