pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / development / python-modules / freesasa / default.nix
blob92b2359862f012ccbab12b7bc558dae7235e998b
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   setuptools,
6   cython,
7   freesasa,
8   pytestCheckHook,
9 }:
11 buildPythonPackage rec {
12   pname = "freesasa";
13   version = "2.2.1";
14   pyproject = true;
16   src = fetchFromGitHub {
17     owner = "freesasa";
18     repo = "freesasa-python";
19     rev = "refs/tags/v${version}";
20     hash = "sha256-/7ymItwXOemY0+IL0k6rWnJI8fAwTFjNXzTV+uf9x9A=";
21   };
23   postPatch = ''
24     ln -s ${freesasa.src}/* lib/
25   '';
27   build-system = [
28     cython
29     setuptools
30   ];
32   env.USE_CYTHON = true;
34   pythonImportsCheck = [ "freesasa" ];
36   nativeCheckInputs = [ pytestCheckHook ];
38   pytestFlagsArray = [ "test.py" ];
40   meta = {
41     description = "FreeSASA Python Module";
42     homepage = "https://github.com/freesasa/freesasa-python";
43     changelog = "https://github.com/freesasa/freesasa-python/blob/${src.rev}/CHANGELOG.md";
44     license = lib.licenses.mit;
45     maintainers = with lib.maintainers; [ natsukium ];
46   };