lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

python312Packages.spglib: cleanup

+22 -21
+22 -21
pkgs/development/python-modules/spglib/default.nix
··· 1 1 { 2 2 lib, 3 3 buildPythonPackage, 4 - fetchPypi, 4 + fetchFromGitHub, 5 + pythonOlder, 5 6 6 7 # build-system 7 8 scikit-build-core, 9 + numpy, 8 10 cmake, 9 - pathspec, 10 11 ninja, 11 - pyproject-metadata, 12 12 setuptools-scm, 13 13 14 14 # dependencies 15 - numpy, 15 + typing-extensions, 16 16 17 17 # tests 18 18 pytestCheckHook, ··· 22 22 buildPythonPackage rec { 23 23 pname = "spglib"; 24 24 version = "2.6.0"; 25 - format = "pyproject"; 25 + pyproject = true; 26 26 27 - src = fetchPypi { 28 - inherit pname version; 29 - hash = "sha256-1m7aK6AKHhT9luycO02/irD7PxJGQ+NXhcce5FW0COs="; 27 + src = fetchFromGitHub { 28 + owner = "spglib"; 29 + repo = "spglib"; 30 + tag = "v${version}"; 31 + hash = "sha256-rmQYFFfpyUhT9pfQZk1fN5tZWTg40wwtszhPhiZpXs4="; 30 32 }; 31 33 32 - nativeBuildInputs = [ 34 + build-system = [ 33 35 scikit-build-core 36 + numpy 34 37 cmake 35 - pathspec 36 38 ninja 37 - pyproject-metadata 38 39 setuptools-scm 39 40 ]; 40 41 41 42 dontUseCmakeConfigure = true; 42 43 43 - postPatch = '' 44 - # relax v2 constrain in [build-system] intended for binary backward compat 45 - substituteInPlace pyproject.toml \ 46 - --replace-fail "numpy~=2.0" "numpy" 47 - ''; 48 - 49 - propagatedBuildInputs = [ numpy ]; 44 + dependencies = 45 + [ 46 + numpy 47 + ] 48 + ++ lib.optionals (pythonOlder "3.13") [ 49 + typing-extensions 50 + ]; 50 51 51 52 nativeCheckInputs = [ 52 53 pytestCheckHook ··· 55 56 56 57 pythonImportsCheck = [ "spglib" ]; 57 58 58 - meta = with lib; { 59 + meta = { 59 60 description = "Python bindings for C library for finding and handling crystal symmetries"; 60 61 homepage = "https://spglib.github.io/spglib/"; 61 62 changelog = "https://github.com/spglib/spglib/raw/v${version}/ChangeLog"; 62 - license = licenses.bsd3; 63 - maintainers = with maintainers; [ psyanticy ]; 63 + license = lib.licenses.bsd3; 64 + maintainers = with lib.maintainers; [ psyanticy ]; 64 65 }; 65 66 }