pyspread: fix build and simplify expression (#117906)

This commit is contained in:
Robert Schütz 2021-04-06 23:54:37 +02:00 committed by GitHub
parent d48e4ede89
commit e289a280f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 34 deletions

View File

@ -1,30 +1,39 @@
{ lib
, buildPythonApplication
, fetchPypi
, python3
, fetchpatch
, makeDesktopItem
, makePythonPath
, dateutil
, matplotlib
, numpy
, pyenchant
, pyqt5
, pytest
, python
, qtsvg
, runtimeShell
, wrapQtAppsHook
}:
buildPythonApplication rec {
python3.pkgs.buildPythonApplication rec {
pname = "pyspread";
version = "1.99.5";
src = fetchPypi {
src = python3.pkgs.fetchPypi {
inherit pname version;
sha256 = "sha256-05bC+Uvx72FAh3qxkgXm8jdb/gHRv1D/M7tjOEdE3Xg=";
};
pythonLibs = [
patches = [
# https://gitlab.com/pyspread/pyspread/-/merge_requests/34
(fetchpatch {
name = "entry-points.patch";
url = "https://gitlab.com/pyspread/pyspread/-/commit/3d8da6a7a7d76f7027d77ca95fac103961d729a2.patch";
excludes = [ "bin/pyspread" "bin/pyspread.bat" ];
sha256 = "1l614k7agv339hrin23jj7s1mq576vkdfkdim6wp224k7y37bnil";
})
];
nativeBuildInputs = [
wrapQtAppsHook
];
buildInputs = [
qtsvg
];
propagatedBuildInputs = with python3.pkgs; [
dateutil
matplotlib
numpy
@ -32,13 +41,10 @@ buildPythonApplication rec {
pyqt5
];
nativeBuildInputs = [ wrapQtAppsHook ];
buildInputs = pythonLibs ++ [
qtsvg
];
doCheck = false; # it fails miserably with a core dump
pythonImportsCheck = [ "pyspread" ];
desktopItem = makeDesktopItem rec {
name = pname;
exec = name;
@ -50,20 +56,11 @@ buildPythonApplication rec {
};
postInstall = ''
runHook preInstall
install -D $out/share/applications
install -m 644 $desktopItem/share/applications/* $out/share/applications
runHook postInstall
install -m 444 -Dt $out/share/applications ${desktopItem}/share/applications/*
'';
fixupPhase = ''
runHook preFixup
sed -i -e "s|#!/bin/bash|#!${runtimeShell}|" $out/bin/pyspread
wrapProgram $out/bin/pyspread \
--prefix PYTHONPATH ':' $(toPythonPath $out):${makePythonPath pythonLibs} \
--prefix PATH ':' ${python}/bin/ \
''${qtWrapperArgs[@]}
runHook postFixup
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
meta = with lib; {

View File

@ -7606,9 +7606,7 @@ in
pympress = callPackage ../applications/office/pympress { };
pyspread = python3Packages.callPackage ../applications/office/pyspread {
inherit (qt5) qtsvg wrapQtAppsHook;
};
pyspread = libsForQt5.callPackage ../applications/office/pyspread { };
pythonIRClib = pythonPackages.pythonIRClib;