about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pvextractor/default.nix
blob: 592a5c107dad76d6e9c7fed33d7ddaa876217fbe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, astropy
, qtpy
, pyqt6
, pyqt-builder
, setuptools
, setuptools-scm
, scipy
, matplotlib
, spectral-cube
, pytestCheckHook
, pytest-astropy
}:

buildPythonPackage rec {
  pname = "pvextractor";
  version = "0.4";
  format = "setuptools";

  disabled = pythonOlder "3.5";

  src = fetchFromGitHub {
    owner = "radio-astro-tools";
    repo = pname;
    rev = "refs/tags/v${version}";
    sha256 = "sha256-TjwoTtoGWU6C6HdFuS+gJj69PUnfchPHs7UjFqwftVQ=";
  };

  buildInputs = [ pyqt-builder ];
  nativeBuildInputs = [ setuptools setuptools-scm ];
  propagatedBuildInputs = [
    astropy
    scipy
    matplotlib
    pyqt6
    qtpy
    spectral-cube
  ];

  env.SETUPTOOLS_SCM_PRETEND_VERSION = version;

  # collecting ... qt.qpa.xcb: could not connect to display
  # qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
  doCheck = false;

  nativeCheckInputs = [
    pytestCheckHook
    pytest-astropy
  ];

  pythonImportsCheck = [ "pvextractor" ];

  meta = with lib; {
    homepage = "http://pvextractor.readthedocs.io";
    description = "Position-velocity diagram extractor";
    license = licenses.bsd3;
    maintainers = with maintainers; [ ifurther ];
  };
}