forked from pool/python-pillow-heif
OBS-URL: https://build.opensuse.org/request/show/1299153 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pillow-heif?expand=0&rev=22
94 lines
2.7 KiB
RPMSpec
94 lines
2.7 KiB
RPMSpec
#
|
|
# spec file for package python-pillow-heif
|
|
#
|
|
# Copyright (c) 2025 SUSE LLC and contributors
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%global flavor @BUILD_FLAVOR@%nil
|
|
%if "%{flavor}" == "test"
|
|
%define psuffix -test
|
|
%bcond_without tests
|
|
%else
|
|
%define psuffix %nil
|
|
%bcond_with tests
|
|
%endif
|
|
Name: python-pillow-heif%{psuffix}
|
|
Version: 1.1.0
|
|
Release: 0
|
|
Summary: Python interface for libheif library
|
|
License: BSD-3-Clause
|
|
URL: https://github.com/bigcat88/pillow_heif
|
|
Source0: %{url}/archive/v%{version}.tar.gz#/python-pillow-heif-%{version}.tar.gz
|
|
BuildRequires: %{python_module Pillow >= 9.5.0}
|
|
BuildRequires: %{python_module Sphinx}
|
|
BuildRequires: %{python_module devel}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module setuptools >= 67.8}
|
|
BuildRequires: %{python_module sphinx-issues}
|
|
BuildRequires: %{python_module sphinx_rtd_theme}
|
|
BuildRequires: %{python_module sphinxcontrib-copybutton}
|
|
BuildRequires: %{python_module wheel}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: pkgconfig(aom) >= 3.3.0
|
|
BuildRequires: pkgconfig(libavif)
|
|
BuildRequires: pkgconfig(libheif) >= 1.18.2
|
|
%if %{with tests}
|
|
BuildRequires: %{python_module Pympler}
|
|
BuildRequires: %{python_module numpy}
|
|
BuildRequires: %{python_module opencv}
|
|
BuildRequires: %{python_module pillow-heif = %{version}}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: libheif-HEIF
|
|
BuildRequires: pkgconfig(libde265)
|
|
%endif
|
|
Requires: python-Pillow >= 9.5.0
|
|
Suggests: python-pillow-heif-doc
|
|
%python_subpackages
|
|
|
|
%description
|
|
Python interface for libheif library
|
|
|
|
%prep
|
|
%autosetup -n pillow_heif-%{version}
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
#docs
|
|
pushd docs
|
|
%make_build html
|
|
popd
|
|
|
|
%install
|
|
%pyproject_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
|
rm docs/_build/html/.buildinfo
|
|
%fdupes docs/_build/html
|
|
%{python_expand} %{fdupes} %{buildroot}
|
|
|
|
%if %{with tests}
|
|
%check
|
|
%pytest
|
|
%endif
|
|
|
|
%files %{python_files}
|
|
%doc docs/_build/html
|
|
%{python_sitearch}/pillow_heif
|
|
%{python_sitearch}/pillow_heif-%{version}.dist-info
|
|
%{python_sitearch}/_pillow_heif.cpython-%{python_version_nodots}-*.so
|
|
|
|
%changelog
|