Merge pull request #168386 from SomeoneSerge/fix-napari

napari: fix after the transition to pyproject.toml
This commit is contained in:
Artturi
2022-04-13 10:30:28 +03:00
committed by GitHub
5 changed files with 80 additions and 6 deletions
@@ -9,20 +9,29 @@
, pyside2
, psygnal
, docstring-parser
, napari # a reverse-dependency, for tests
}: buildPythonPackage rec {
pname = "magicgui";
version = "0.3.7";
format = "pyproject";
src = fetchFromGitHub {
owner = "napari";
repo = "magicgui";
rev = "v${version}";
sha256 = "sha256-LYXNNr5lS3ibQk2NIopZkB8kzC7j3yY8moGMk0Gr+hU=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ typing-extensions qtpy pyside2 psygnal docstring-parser ];
checkInputs = [ pytestCheckHook pytest-mypy-plugins ];
doCheck = false; # Reports "Fatal Python error"
SETUPTOOLS_SCM_PRETEND_VERSION = version;
passthru.tests = { inherit napari; };
meta = with lib; {
description = "Build GUIs from python functions, using magic. (napari/magicgui)";
@@ -0,0 +1,54 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, appdirs
, pyyaml
, pytomlpp
, pydantic
, magicgui
, typer
, setuptools-scm
, napari # reverse dependency, for tests
}:
let
pname = "napari-npe2";
version = "0.3.0";
in
buildPythonPackage {
inherit pname version;
format = "pyproject";
src = fetchFromGitHub {
owner = "napari";
repo = "npe2";
rev = "v${version}";
hash = "sha256-IyDUeztWQ8JWXDo//76iHzAlWWaZP6/0lwCh0eZAZsM=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
# npe2 *can* build without it,
# but then setuptools refuses to acknowledge it when building napari
setuptools-scm
];
propagatedBuildInputs = [
appdirs
pyyaml
pytomlpp
pydantic
magicgui
typer
];
passthru.tests = { inherit napari; };
meta = with lib; {
description = "Yet another plugin system for napari (the image visualizer)";
homepage = "https://github.com/napari/npe2";
license = licenses.bsd3;
maintainers = with maintainers; [ SomeoneSerge ];
};
}
@@ -6,7 +6,7 @@
, superqt
, typing-extensions
, tifffile
, napari-plugin-engine
, napari-npe2
, pint
, pyyaml
, numpydoc
@@ -29,15 +29,24 @@
}: mkDerivationWith buildPythonPackage rec {
pname = "napari";
version = "0.4.14";
format = "pyproject";
src = fetchFromGitHub {
owner = "napari";
repo = pname;
rev = "v${version}";
sha256 = "sha256-uDDj5dzsT4tRVV0Y+CYegiCpLM77XFaXEXEZXTnX808=";
};
nativeBuildInputs = [ setuptools-scm wrapQtAppsHook ];
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools-scm
wrapQtAppsHook
];
propagatedBuildInputs = [
napari-plugin-engine
napari-npe2
cachey
napari-svg
napari-console
@@ -60,7 +69,7 @@
jsonschema
scipy
];
SETUPTOOLS_SCM_PRETEND_VERSION = version;
dontUseSetuptoolsCheck = true;
postFixup = ''
wrapQtApp $out/bin/napari
@@ -34,6 +34,6 @@ stdenv.mkDerivation {
license = with licenses; [ gpl2 lgpl21 ];
homepage = "https://wiki.qt.io/Qt_for_Python";
maintainers = with maintainers; [ gebner ];
broken = stdenv.isDarwin;
broken = stdenv.isDarwin || python.isPy310;
};
}
+2
View File
@@ -5429,6 +5429,8 @@ in {
napari-console = callPackage ../development/python-modules/napari-console { };
napari-npe2 = callPackage ../development/python-modules/napari-npe2 { };
napari-plugin-engine = callPackage ../development/python-modules/napari-plugin-engine { };
napari-svg = callPackage ../development/python-modules/napari-svg { };