diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/python-modules/tifffile')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/development/python-modules/tifffile/default.nix | 53 | ||||
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/development/python-modules/tifffile/python2-regex-compat.patch | 23 |
2 files changed, 76 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/tifffile/default.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/tifffile/default.nix new file mode 100644 index 000000000000..9383cf947c20 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/tifffile/default.nix @@ -0,0 +1,53 @@ +{ lib +, fetchPypi +, buildPythonPackage +, isPy27 +, isPy3k +, numpy +, imagecodecs-lite +, enum34 +, futures +, pathlib +, pytest +}: + +buildPythonPackage rec { + pname = "tifffile"; + version = "2020.11.26"; + + src = fetchPypi { + inherit pname version; + sha256 = "c712df6f201385fbd3500e26e45dc20fabcbb0c6c1fbfb4c1e44538a9d0269a8"; + }; + + patches = lib.optional isPy27 ./python2-regex-compat.patch; + + # Missing dependencies: imagecodecs, czifile, cmapfile, oiffile, lfdfiles + # and test data missing from PyPI tarball + doCheck = false; + + checkInputs = [ + pytest + ]; + + checkPhase = '' + pytest + ''; + + propagatedBuildInputs = [ + numpy + ] ++ lib.optionals isPy3k [ + imagecodecs-lite + ] ++ lib.optionals isPy27 [ + futures + enum34 + pathlib + ]; + + meta = with lib; { + description = "Read and write image data from and to TIFF files."; + homepage = "https://www.lfd.uci.edu/~gohlke/"; + maintainers = [ maintainers.lebastr ]; + license = licenses.bsd3; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/tifffile/python2-regex-compat.patch b/infra/libkookie/nixpkgs/pkgs/development/python-modules/tifffile/python2-regex-compat.patch new file mode 100644 index 000000000000..7f4ec5764bb2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/tifffile/python2-regex-compat.patch @@ -0,0 +1,23 @@ +--- a/setup.py 2019-02-20 18:52:12.000000000 +0100 ++++ b/setup.py 2019-03-02 13:55:39.014019260 +0100 +@@ -20,12 +20,6 @@ +
+ description = re.search(r'"""(.*)\.(?:\r\n|\r|\n)', code).groups()[0]
+
+-readme = re.search(r'(?:\r\n|\r|\n){2}"""(.*)"""(?:\r\n|\r|\n){2}from', code,
+- re.MULTILINE | re.DOTALL).groups()[0]
+-
+-readme = '\n'.join([description, '=' * len(description)]
+- + readme.splitlines()[1:])
+-
+ license = re.search(r'(# Copyright.*?(?:\r\n|\r|\n))(?:\r\n|\r|\n)+""', code,
+ re.MULTILINE | re.DOTALL).groups()[0]
+
+@@ -41,7 +35,6 @@ + name='tifffile',
+ version=version,
+ description=description,
+- long_description=readme,
+ author='Christoph Gohlke',
+ author_email='cgohlke@uci.edu',
+ url='https://www.lfd.uci.edu/~gohlke/',
|