%global desc Pycdlib is a pure python library for reading, writing, and otherwise\
manipulating ISO9660 files.  It is focused on speed, correctness, and\
conformance to the various standards around ISO9660, including ISO9660 itself,\
the Joliet extensions, the Rock Ridge extensions, the El Torito boot\
extensions, and UDF.

%global srcname pycdlib

Summary:        A pure python ISO9660 read and write library
Name:           python-%{srcname}
Version:        @VERSION@
Release:        @RELEASE@%{?dist}
License:        LGPLv2
Group:          Development/Libraries
URL:            https://github.com/clalancette/%{srcname}
Source0:        https://github.com/clalancette/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python3-devel
BuildRequires:  genisoimage
BuildRequires:  python3-pytest

%description
%{desc}

%package -n python3-%{srcname}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
%{desc}

%package -n %{srcname}-tools
Summary:        Tools that rely on %{srcname}
Requires:       python3-%{srcname} = %{version}-%{release}

%description -n %{srcname}-tools
Some tools that use the %{srcname} library.

%prep
%autosetup -n %{srcname}-%{version}

%build
%py3_build

%install
%py3_install

%check
PYCDLIB_TRACK_WRITES=1 py.test-%{python3_version} -v tests

%files -n python3-%{srcname}
%license COPYING
%doc README.md examples/
%{python3_sitelib}/%{srcname}
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/

%files -n %{srcname}-tools
%license COPYING
%{_bindir}/pycdlib-explorer
%{_bindir}/pycdlib-extract-files
%{_bindir}/pycdlib-genisoimage
%{_mandir}/man1/*

%changelog
* Sat Jan 14 2023 Chris Lalancette <clalancette@gmail.com> - 1.14.0-1
- Update to upstream version 1.14.0

* Mon Jun 20 2022 Chris Lalancette <clalancette@gmail.com> - 1.13.0-1
- Update to upstream version 1.13.0

* Tue Aug 10 2021 Chris Lalancette <clalancette@gmail.com> - 1.12.0-1
- Update to upstream version 1.12.0

* Wed Oct 07 2020 Chris Lalancette <clalancette@gmail.com> - 1.11.0-1
- Update to upstream version 1.11.0

* Sun May 24 2020 Chris Lalancette <clalancette@gmail.com> - 1.10.0-1
- Update to upstream version 1.10.0

* Fri Dec 20 2019 Chris Lalancette <clalancette@gmail.com> - 1.9.0-1
- Update to upstream version 1.9.0

* Sat Aug 10 2019 Chris Lalancette <clalancette@gmail.com> - 1.8.0-1
- Update to upstream version 1.8.0

* Wed Feb 27 2019 Chris Lalancette <clalancette@gmail.com> - 1.7.0-1
- Update to upstream version 1.7.0

* Sun Jul 29 2018 Chris Lalancette <clalancette@gmail.com> - 1.6.0-1
- Update to upstream version 1.6.0

* Sat Jun 23 2018 Chris Lalancette <clalancette@gmail.com> - 1.5.0-1
- Update to upstream version 1.5.0

* Fri May 04 2018 Chris Lalancette <clalancette@gmail.com> - 1.4.0-1
- Update to upstream version 1.4.0

* Mon Nov 20 2017 Chris Lalancette <clalancette@gmail.com> - 1.3.2-1
- Update to upstream version 1.3.2

* Mon Nov 20 2017 Chris Lalancette <clalancette@gmail.com> - 1.3.1-1
- Update to upstream version 1.3.1

* Sun Nov 19 2017 Chris Lalancette <clalancette@gmail.com> - 1.3.0-1
- Update to upstream version 1.3.0

* Tue Oct 03 2017 Chris Lalancette <clalancette@gmail.com> - 1.2.0-1
- Update to upstream version 1.2.0

* Tue Jan 31 2017 Chris Lalancette <clalancette@gmail.com> - 1.1.0-1
- Update to upstream version 1.1.0

* Tue Oct 25 2016 Chris Lalancette <clalancette@gmail.com> - 1.0.0-1
- Update to upstream version 1.0.0

* Wed Dec 30 2015 Chris Lalancette <clalancette@gmail.com> - 0.1.0-1
- Initial package.
