1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, astropy
6, qtpy
7, pyqt6
8, pyqt-builder
9, setuptools
10, setuptools-scm
11, scipy
12, matplotlib
13, spectral-cube
14, pytestCheckHook
15, pytest-astropy
16}:
17
18buildPythonPackage rec {
19 pname = "pvextractor";
20 version = "0.4";
21
22 disabled = pythonOlder "3.5";
23
24 src = fetchFromGitHub {
25 owner = "radio-astro-tools";
26 repo = pname;
27 rev = "refs/tags/v${version}";
28 sha256 = "sha256-TjwoTtoGWU6C6HdFuS+gJj69PUnfchPHs7UjFqwftVQ=";
29 };
30
31 buildInputs = [ pyqt-builder ];
32 nativeBuildInputs = [ setuptools setuptools-scm ];
33 propagatedBuildInputs = [
34 astropy
35 scipy
36 matplotlib
37 pyqt6
38 qtpy
39 spectral-cube
40 ];
41
42 env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
43
44 # collecting ... qt.qpa.xcb: could not connect to display
45 # qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
46 doCheck = false;
47
48 nativeCheckInputs = [
49 pytestCheckHook
50 pytest-astropy
51 ];
52
53 pythonImportsCheck = [ "pvextractor" ];
54
55 meta = with lib; {
56 homepage = "http://pvextractor.readthedocs.io";
57 description = "Position-velocity diagram extractor";
58 license = licenses.bsd3;
59 maintainers = with maintainers; [ ifurther ];
60 };
61}