Skip to content

Commit 421be36

Browse files
python312Packages.{sumo,numericalunits}: fix build (#382481)
2 parents f029584 + 1215ea9 commit 421be36

File tree

2 files changed

+51
-32
lines changed

2 files changed

+51
-32
lines changed
Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,39 @@
11
{
22
lib,
33
buildPythonPackage,
4-
fetchPypi,
5-
isPy3k,
4+
fetchFromGitHub,
5+
setuptools,
6+
pytestCheckHook,
67
}:
78

89
buildPythonPackage rec {
9-
version = "1.26";
10-
format = "setuptools";
1110
pname = "numericalunits";
11+
version = "1.26";
12+
pyproject = true;
1213

13-
src = fetchPypi {
14-
inherit pname version;
15-
sha256 = "sha256-igtplF3WXqz27vjIaLzTKY10OfWIL1B7tgYOwgxyPhI=";
14+
src = fetchFromGitHub {
15+
owner = "sbyrnes321";
16+
repo = "numericalunits";
17+
tag = "numericalunits-${version}";
18+
hash = "sha256-vPB1r+j+p9n+YLnBjHuk2t+QSr+adEOjyC45QSbeb4M=";
1619
};
1720

18-
disabled = !isPy3k;
21+
build-system = [
22+
setuptools
23+
];
24+
25+
nativeCheckInputs = [
26+
pytestCheckHook
27+
];
28+
29+
pytestFlagsArray = [
30+
"tests/tests.py"
31+
];
1932

20-
meta = with lib; {
33+
meta = {
2134
homepage = "http://pypi.python.org/pypi/numericalunits";
2235
description = "Package that lets you define quantities with unit";
23-
license = licenses.mit;
24-
maintainers = [ ];
36+
license = lib.licenses.mit;
37+
maintainers = with lib.maintainers; [ nickcao ];
2538
};
2639
}

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

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,25 @@
33
buildPythonPackage,
44
fetchFromGitHub,
55
pythonOlder,
6-
cython,
7-
h5py,
8-
matplotlib,
6+
setuptools,
7+
spglib,
98
numpy,
10-
phonopy,
11-
pymatgen,
129
scipy,
10+
h5py,
11+
pymatgen,
12+
phonopy,
13+
matplotlib,
1314
seekpath,
14-
spglib,
1515
castepxbin,
16-
pytestCheckHook,
1716
colormath,
17+
importlib-resources,
18+
pytestCheckHook,
1819
}:
1920

2021
buildPythonPackage rec {
2122
pname = "sumo";
2223
version = "2.3.10";
23-
format = "setuptools";
24+
pyproject = true;
2425

2526
disabled = pythonOlder "3.8";
2627

@@ -31,30 +32,35 @@ buildPythonPackage rec {
3132
hash = "sha256-WoOW+JPo5x9V6LN+e8Vf3Q3ohHhQVK81s0Qk7oPn1Tk=";
3233
};
3334

34-
nativeBuildInputs = [ cython ];
35+
build-system = [
36+
setuptools
37+
];
3538

36-
propagatedBuildInputs = [
37-
castepxbin
38-
colormath
39-
h5py
40-
matplotlib
39+
dependencies = [
40+
spglib
4141
numpy
42-
phonopy
43-
pymatgen
4442
scipy
43+
h5py
44+
pymatgen
45+
phonopy
46+
matplotlib
4547
seekpath
46-
spglib
48+
castepxbin
49+
colormath
50+
importlib-resources
4751
];
4852

49-
nativeCheckInputs = [ pytestCheckHook ];
53+
nativeCheckInputs = [
54+
pytestCheckHook
55+
];
5056

5157
pythonImportsCheck = [ "sumo" ];
5258

53-
meta = with lib; {
59+
meta = {
5460
description = "Toolkit for plotting and analysis of ab initio solid-state calculation data";
5561
homepage = "https://github.com/SMTG-UCL/sumo";
5662
changelog = "https://github.com/SMTG-Bham/sumo/releases/tag/v${version}";
57-
license = licenses.mit;
58-
maintainers = with maintainers; [ psyanticy ];
63+
license = lib.licenses.mit;
64+
maintainers = with lib.maintainers; [ psyanticy ];
5965
};
6066
}

0 commit comments

Comments
 (0)