%global pypi_name python-xmp-toolkit
%global srcname xmp-toolkit
Name: python-%{srcname}
Version: 2.0.1
Release: 2%{?dist}
Summary: Python XMP Toolkit for working with metadata
License: BSD
URL: https://github.com/python-xmp-toolkit/python-xmp-toolkit
Source0: %{pypi_source %{pypi_name}}
# https://github.com/python-xmp-toolkit/python-xmp-toolkit/pull/68
Patch0001: 2f94011ab789d1d2cabc41db7a708a19a62bb573.patch
BuildArch: noarch
BuildRequires: exempi
BuildRequires: python3-devel
BuildRequires: python3dist(pytz)
BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(sphinx)
%description
Python XMP Toolkit Python XMP Toolkit is a library for working with XMP
metadata, as well as reading/writing XMP metadata stored in many different file
formats.
%package -n python3-%{srcname}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{srcname}}
Requires: exempi
%{?python_enable_dependency_generator}
%description -n python3-%{srcname}
Python XMP Toolkit Python XMP Toolkit is a library for working with XMP
metadata, as well as reading/writing XMP metadata stored in many different file
formats.
%package -n python-%{srcname}-doc
Summary: python-xmp-toolkit documentation
%description -n python-%{srcname}-doc
Documentation for python-xmp-toolkit
%prep
%autosetup -n %{pypi_name}-%{version} -p1
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%py3_build
# generate html docs
PYTHONPATH=${PWD} sphinx-build-3 docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%install
%py3_install
%check
%{__python3} setup.py test
%files -n python3-%{srcname}
%license LICENSE
%doc README.rst
%{python3_sitelib}/libxmp
%{python3_sitelib}/python_xmp_toolkit-%{version}-py?.?.egg-info
%files -n python-%{srcname}-doc
%doc html
%license LICENSE
%changelog
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Aug 21 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.0.1-1
- Initial package.