2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
buildPythonPackage,
|
|
|
|
exempi,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytz,
|
|
|
|
lib,
|
|
|
|
stdenv,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage {
|
|
|
|
pname = "python-xmp-toolkit";
|
|
|
|
version = "2.0.2";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# PyPi has version 2.0.1; the tests fail
|
|
|
|
# There are commits for a 2.0.2 release that was never published
|
|
|
|
# Not to github, not to PyPi
|
|
|
|
# This is the latest commit from Jun 29, 2017 (as of Mar 13, 2019)
|
|
|
|
# It includes the commits for the unreleased version 2.0.2 and more
|
|
|
|
# Tests pass with this version
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "python-xmp-toolkit";
|
|
|
|
repo = "python-xmp-toolkit";
|
|
|
|
rev = "5692bdf8dac3581a0d5fb3c5aeb29be0ab6a54fc";
|
|
|
|
sha256 = "16bylcm183ilzp7mrpdzw0pzp6csv9v5v247914qsv2abg0hgl5y";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ exempi ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pytz ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace libxmp/exempi.py \
|
|
|
|
--replace "ctypes.util.find_library('exempi')" "'${exempi}/lib/libexempi${stdenv.hostPlatform.extensions.sharedLibrary}'"
|
|
|
|
'';
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
# hangs on darwin + sandbox
|
2024-09-26 11:04:55 +00:00
|
|
|
doCheck = !stdenv.hostPlatform.isDarwin;
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
preCheck = ''
|
|
|
|
rm test/{test_exempi,test_files}.py
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/python-xmp-toolkit/python-xmp-toolkit";
|
|
|
|
description = "Python XMP Toolkit for working with metadata";
|
|
|
|
license = licenses.bsd3;
|
2024-06-24 18:47:55 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|