3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #186588 from onny/psd-tools

This commit is contained in:
Sandro 2022-08-16 14:02:45 +02:00 committed by GitHub
commit 1767504eec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 70 additions and 8 deletions

View file

@ -0,0 +1,41 @@
{ lib
, fetchFromGitHub
, buildPythonPackage
, pytest
, python
, pillow
, numpy
}:
buildPythonPackage rec {
pname = "aggdraw";
version = "1.3.15";
src = fetchFromGitHub {
owner = "pytroll";
repo = pname;
rev = "v${version}";
sha256 = "sha256-w3HlnsHYB0R+HZOXtzygC2RST3gllPI7SYtwSCVXhTU=";
};
checkInputs = [
numpy
pillow
pytest
];
checkPhase = ''
runHook preCheck
${python.interpreter} selftest.py
runHook postCheck
'';
pythonImportsCheck = [ "aggdraw" ];
meta = with lib; {
description = "High quality drawing interface for PIL";
homepage = "https://github.com/pytroll/aggdraw";
license = licenses.mit;
maintainers = with maintainers; [ onny ];
};
}

View file

@ -1,27 +1,46 @@
{ lib, buildPythonPackage, fetchPypi, isPy27
{ lib
, buildPythonPackage
, fetchFromGitHub
, isPy27
, docopt
, pillow
, enum34
, scikitimage
, aggdraw
, pytestCheckHook
, ipython
, cython
}:
buildPythonPackage rec {
pname = "psd-tools";
version = "1.9.21";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-BlfJnC03W0BEOr2Nav0Tj0fzjwAVlTPjyN0KmxxQMVI=";
src = fetchFromGitHub {
owner = "psd-tools";
repo = pname;
rev = "v${version}";
sha256 = "sha256-+nqN7DJHbr7XkfG0oUQkWcxv+krR8DlQndAQCvnBk3s=";
};
nativeBuildInputs = [ cython ];
propagatedBuildInputs = [
aggdraw
docopt
ipython
pillow
] ++ lib.optionals isPy27 [ enum34 ];
scikitimage
];
meta = {
checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "psd_tools" ];
meta = with lib; {
description = "Python package for reading Adobe Photoshop PSD files";
homepage = "https://github.com/kmike/psd-tools";
license = lib.licenses.mit;
broken = true; # missing packbits from nixpkgs
license = licenses.mit;
maintainers = with maintainers; [ onny ];
};
}

View file

@ -237,6 +237,8 @@ in {
agent-py = callPackage ../development/python-modules/agent-py { };
aggdraw = callPackage ../development/python-modules/aggdraw { };
aio-geojson-client = callPackage ../development/python-modules/aio-geojson-client { };
aio-geojson-generic-client = callPackage ../development/python-modules/aio-geojson-generic-client { };