From 925b48774a05357c367f3daf6495dd0f2d7f192b Mon Sep 17 00:00:00 2001 From: ifurther <55025025+ifurther@users.noreply.github.com> Date: Wed, 8 Nov 2023 16:52:19 +0800 Subject: python3Packages.pvextractor: init at v0.3 --- .../python-modules/pvextractor/default.nix | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 pkgs/development/python-modules/pvextractor/default.nix (limited to 'pkgs/development') diff --git a/pkgs/development/python-modules/pvextractor/default.nix b/pkgs/development/python-modules/pvextractor/default.nix new file mode 100644 index 00000000000..315d0411b8e --- /dev/null +++ b/pkgs/development/python-modules/pvextractor/default.nix @@ -0,0 +1,61 @@ +{ 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.3"; + + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "radio-astro-tools"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-HYus2Gk3hzKq+3lJLOJQ+EE6LeO+DrvqLK3NpqrUYeI="; + }; + + 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 ]; + }; +} -- cgit 1.4.1