python312Packages.{sumo,numericalunits}: fix build (#382481)

authored by

Sandro and committed by
GitHub
421be36d f0295845

+51 -32
+24 -11
pkgs/development/python-modules/numericalunits/default.nix
··· 1 1 { 2 2 lib, 3 3 buildPythonPackage, 4 - fetchPypi, 5 - isPy3k, 4 + fetchFromGitHub, 5 + setuptools, 6 + pytestCheckHook, 6 7 }: 7 8 8 9 buildPythonPackage rec { 9 - version = "1.26"; 10 - format = "setuptools"; 11 10 pname = "numericalunits"; 11 + version = "1.26"; 12 + pyproject = true; 12 13 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="; 16 19 }; 17 20 18 - disabled = !isPy3k; 21 + build-system = [ 22 + setuptools 23 + ]; 24 + 25 + nativeCheckInputs = [ 26 + pytestCheckHook 27 + ]; 28 + 29 + pytestFlagsArray = [ 30 + "tests/tests.py" 31 + ]; 19 32 20 - meta = with lib; { 33 + meta = { 21 34 homepage = "http://pypi.python.org/pypi/numericalunits"; 22 35 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 ]; 25 38 }; 26 39 }
+27 -21
pkgs/development/python-modules/sumo/default.nix
··· 3 3 buildPythonPackage, 4 4 fetchFromGitHub, 5 5 pythonOlder, 6 - cython, 7 - h5py, 8 - matplotlib, 6 + setuptools, 7 + spglib, 9 8 numpy, 10 - phonopy, 9 + scipy, 10 + h5py, 11 11 pymatgen, 12 - scipy, 12 + phonopy, 13 + matplotlib, 13 14 seekpath, 14 - spglib, 15 15 castepxbin, 16 + colormath, 17 + importlib-resources, 16 18 pytestCheckHook, 17 - colormath, 18 19 }: 19 20 20 21 buildPythonPackage rec { 21 22 pname = "sumo"; 22 23 version = "2.3.10"; 23 - format = "setuptools"; 24 + pyproject = true; 24 25 25 26 disabled = pythonOlder "3.8"; 26 27 ··· 31 32 hash = "sha256-WoOW+JPo5x9V6LN+e8Vf3Q3ohHhQVK81s0Qk7oPn1Tk="; 32 33 }; 33 34 34 - nativeBuildInputs = [ cython ]; 35 + build-system = [ 36 + setuptools 37 + ]; 35 38 36 - propagatedBuildInputs = [ 37 - castepxbin 38 - colormath 39 - h5py 40 - matplotlib 39 + dependencies = [ 40 + spglib 41 41 numpy 42 - phonopy 43 - pymatgen 44 42 scipy 43 + h5py 44 + pymatgen 45 + phonopy 46 + matplotlib 45 47 seekpath 46 - spglib 48 + castepxbin 49 + colormath 50 + importlib-resources 47 51 ]; 48 52 49 - nativeCheckInputs = [ pytestCheckHook ]; 53 + nativeCheckInputs = [ 54 + pytestCheckHook 55 + ]; 50 56 51 57 pythonImportsCheck = [ "sumo" ]; 52 58 53 - meta = with lib; { 59 + meta = { 54 60 description = "Toolkit for plotting and analysis of ab initio solid-state calculation data"; 55 61 homepage = "https://github.com/SMTG-UCL/sumo"; 56 62 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 ]; 59 65 }; 60 66 }