#2 Update to 0.9.8 (fix RHBZ#2060033, fix RHBZ#2062941)
Merged 2 years ago by music. Opened 2 years ago by music.
rpms/ music/python-glymur v0.9.8  into  rawhide

file modified
+2
@@ -1,1 +1,3 @@ 

  /python-glymur-0.9.4.tar.gz

+ /python-glymur-0.9.7.post1.tar.gz

+ /python-glymur-0.9.8.tar.gz

file modified
+2
@@ -37,4 +37,6 @@ 

  (default:

  .BR 1 )

  .SH "SEE ALSO"

+ .BR tiff2jp2 (1)

+ .P

  .BR j2k_dump (1)

file modified
+55 -6
@@ -1,17 +1,33 @@ 

  Name:           python-glymur

- Version:        0.9.4

+ Version:        0.9.8

  Release:        %autorelease

  Summary:        Interface to the OpenJPEG library for working with JPEG 2000 files

  

  License:        MIT

  URL:            https://pypi.org/project/Glymur/

  Source0:        https://github.com/quintusdias/glymur/archive/v%{version}/%{name}-%{version}.tar.gz

+ # Man pages hand-written for Fedora in groff_man(7) format based on --help

+ # output:

  Source1:        jp2dump.1

+ Source2:        tiff2jp2.1

+ 

+ # We must give up “noarch” in the base package in order to skip tests with an

+ # %%ifarch conditional. This is OK, as we can still make all the built RPMs

+ # noarch, and building on all architectures helps flush out the kind of

+ # architecture-dependent issues this package has already encountered. Since the

+ # package does not in fact contain any compiled code, there is no corresponding

+ # debuginfo package.

+ %global debug_package %{nil}

  

- BuildArch:      noarch

  BuildRequires:  python3-devel

- BuildRequires:  python3-pytest

- BuildRequires:  python3-scikit-image

+ BuildRequires:  python3dist(pytest)

+ # tests/fixtures.py: each of these enables more tests

+ BuildRequires:  python3dist(scikit-image)

+ BuildRequires:  python3dist(gdal)

+ 

+ # Provide shared libraries opened via ctypes; see glymur/config.py

+ BuildRequires:  openjpeg2

+ BuildRequires:  libtiff

  

  %global _description %{expand:

  Glymur contains a Python interface to the OpenJPEG
@@ -23,12 +39,22 @@ 

  Requires:       openjpeg2

  Summary:        %{summary}

  

+ BuildArch:      noarch

+ 

+ # Provide shared libraries opened via ctypes; see glymur/config.py

+ Requires:       openjpeg2

+ Requires:       libtiff

+ 

+ # glymur/jp2box.py: provides optional functionality

+ Recommends:     python3dist(gdal)

+ 

  %description -n python3-glymur %_description

  

  

  %prep

  %autosetup -n glymur-%{version}

  

+ 

  %generate_buildrequires

  %pyproject_buildrequires -r

  
@@ -38,22 +64,45 @@ 

  

  

  %install

- install -m 0644 -p -D -t %{buildroot}%{_mandir}/man1 %{SOURCE1}

+ install -m 0644 -p -D -t %{buildroot}%{_mandir}/man1 %{SOURCE1} %{SOURCE2}

  

  %pyproject_install

  %pyproject_save_files glymur

  

  

  %check

- %pytest

+ %ifarch s390x

+ # These all have a ZeroDivisionError due to RHBZ#2060087

+ # (https://github.com/quintusdias/glymur/issues/545). It is a real bug that

+ # could affect TIFF images with RowsPerStrip>65535 on any platform, and affects

+ # every TIFF image on big-endian platforms. We skip the failures for now;

+ # upstream is working on it.

+ k="${k-}${k+ and }not (TestSuite and test_minisblack_3strip_to_2x2)"

+ k="${k-}${k+ and }not (TestSuite and test_partial_last_strip)"

+ k="${k-}${k+ and }not (TestSuite and test_partial_strip_and_partial_tiles)"

+ k="${k-}${k+ and }not (TestSuiteNoScikitImage and test_rgb_stripped)"

+ k="${k-}${k+ and }not (TestSuiteNoScikitImage and test_rgb_stripped_bottom_of_tile_coincides_with_bottom_of_strip)"

+ k="${k-}${k+ and }not (TestSuiteNoScikitImage and test_stripped_logging)"

+ 

+ # TODO: If upstream does not fix this as part of

+ # https://github.com/quintusdias/glymur/issues/545, report it separately.

+ #         # That first image should be lossless.

+ # >       self.assertTrue(np.isinf(psnr[0]))

+ # E       AssertionError: False is not true

+ k="${k-}${k+ and }not (TestSuite and test_psnr)"

+ %endif

+ %pytest -v -k "${k-}"

  

  

  %files -n python3-glymur -f %{pyproject_files}

  %doc README.md CHANGES.txt

  %license LICENSE.txt

  %{_bindir}/jp2dump

+ %{_bindir}/tiff2jp2

+ 

  %exclude %{python3_sitelib}/tests

  %{_mandir}/man1/jp2dump.1*

+ %{_mandir}/man1/tiff2jp2.1*

  

  %changelog

  %autochangelog

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (python-glymur-0.9.4.tar.gz) = 8fa6a3ad17af897af3aa79cb2cd65145eda6c78489768535701f1805dcab356483ffe91c6897e6d4d73156527ddb0b90c3d48b2d725f166536351316c765d077

+ SHA512 (python-glymur-0.9.8.tar.gz) = a631e845837f57fa0119f5dd6f9b40938134e6d627c76458c31ab426067e5eb1f488244874790d065bad240f6aa4ad622596ce7732b803dffafe8e9a6b190b7f

file added
+103
@@ -0,0 +1,103 @@ 

+ .TH TIFF2JP2 "1" "March 2022" "" "User Commands"

+ .SH NAME

+ .B tiff2jp2

+ \(en convert TIFF to JPEG 2000

+ .SH SYNOPSIS

+ .B tiff2jp2

+ .RB [ \-h ]

+ .RB [ \-\-tilesize\ \fIh\fR\ \fIw ]

+ .RB [ \-\-verbosity\  { critical , error , warning , info , debug }]

+ .RB [ \-\-cratio\ \fICRATIO ]

+ .RB [ \-\-psnr\ \fIPSNR ]

+ .RB [ \-\-codeblocksize\ \fIcblkh\fR\ \fIcblkw ]

+ .RB [ \-\-numres\ \fINUMRES ]

+ .RB [ \-\-prog\  { lrcp , rlcp , rpcl , prcl , cprl }]

+ .I tifffile

+ .I jp2kfile

+ .SH OPTIONS

+ .SS "POSITIONAL ARGUMENTS"

+ .TP

+ .I tifffile

+ .TP

+ .I jp2kfile

+ .SS "OPTIONAL ARGUMENTS"

+ Normally you should at least provide the

+ .B \-\-tilesize

+ argument.

+ .BR tiff2jp2 (1)

+ will

+ .B NOT

+ automatically use the TIFF tile dimensions (if tiled).

+ .TP

+ .BR \-h ,\  \-\-help

+ Show a help message and exit.

+ .TP

+ .B \-\-tilesize\ \fIh\fR\ \fIw

+ Dimensions of JP2K tile.

+ (default:

+ .BR None )

+ .TP

+ .BR \-\-verbosity\  { critical , error , warning , info , debug }

+ Logging level, one of

+ .RB \(lq critical \(rq,

+ .RB \(lq error \(rq,

+ .RB \(lq warning \(rq,

+ .RB \(lq info \(rq,

+ or

+ .RB \(lq debug \(rq.

+ (default:

+ .BR warning )

+ .TP

+ .B \-\-cratio\ \fICRATIO

+ Compression ratio for successive layers.

+ You may specify more than once to get multiple layers.

+ (default:

+ .BR None )

+ .TP

+ .B \-\-psnr\ \fIPSNR

+ PSNR for successive layers.

+ You may specify more than once to get multiple layers.

+ (default:

+ .BR None )

+ .TP

+ .B \-\-codeblocksize\ \fIcblkh\fR\ \fIcblkw

+ Codeblock size.

+ (default:

+ .BR None )

+ .TP

+ .B \-\-numres\ \fINUMRES

+ Number of decomposition levels.

+ (default:

+ .BR 0 )

+ .TP

+ .BR \-\-prog\  { lrcp , rlcp , rpcl , prcl , cprl }

+ Progression order.

+ (default:

+ .BR lrcp )

+ .TP

+ .B \-\-irreversible

+ Use irreversible 9x7 transform.

+ (default:

+ .BR False )

+ .TP

+ .B \-\-eph

+ Generate EPH markers.

+ (default:

+ .BR False )

+ .TP

+ .B \-\-plt

+ Generate PLT markers.

+ (default:

+ .BR False )

+ .TP

+ .B \-\-sop

+ Generate SOP markers.

+ (default:

+ .BR False )

+ .TP

+ .B \-\-nouuid

+ Do not create UUID box for TIFF metadata.

+ (default:

+ .BR True )

+ .SH "SEE ALSO"

+ .BR jp2dump (1)

This replaces PR#1.

It fixes python-glymur: FTBFS in Fedora Rawhide and python-glymur-0.9.8 is available by packaging the latest upstream release.

Known issues related to python-glymur test failures on s390x (Test failures on big-endian architecture (s390x)) are handled by skipping the tests on s390x, even though the main underlying issue could affect certain TIFF files on little-endian platforms, too, until upstream has a fix.

Pull-Request has been merged by music

2 years ago