Merge pull request #92916 from freezeboy/update-labelimg

labelImg: 1.8.1 -> 1.8.3
This commit is contained in:
Lassulus 2020-08-20 21:29:10 +02:00 committed by GitHub
commit 32a89684d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,20 +1,31 @@
{ stdenv, python2Packages, fetchurl }:
python2Packages.buildPythonApplication rec {
{ stdenv, python3Packages, fetchFromGitHub, qt5 }:
python3Packages.buildPythonApplication rec {
pname = "labelImg";
version = "1.8.1";
src = fetchurl {
url = "https://github.com/tzutalin/labelImg/archive/v${version}.tar.gz";
sha256 = "1banpkpbrny1jx3zsgs544xai62z5yvislbq782a5r47gv2f2k4a";
version = "1.8.3";
src = fetchFromGitHub {
owner = "tzutalin";
repo = "labelImg";
rev = "v${version}";
sha256 = "07v106fzlmxrbag4xm06m4mx9m0gckb27vpwsn7sap1bbgc1pap5";
};
nativeBuildInputs = with python2Packages; [
pyqt4
nativeBuildInputs = with python3Packages; [
pyqt5
qt5.wrapQtAppsHook
];
propagatedBuildInputs = with python2Packages; [
pyqt4
propagatedBuildInputs = with python3Packages; [
pyqt5
lxml
sip
];
preBuild = ''
make qt4py2
make qt5py3
'';
postInstall = ''
cp libs/resources.py $out/${python3Packages.python.sitePackages}/libs
'';
dontWrapQtApps = true;
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
meta = with stdenv.lib; {
description = "LabelImg is a graphical image annotation tool and label object bounding boxes in images";