| |
@@ -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
|
| |
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.