## START: Set by rpmautospec
## (rpmautospec version 0.3.0)
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 2;
    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
    print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec

%global pypi_name adafruit-platformdetect

Name:           python-%{pypi_name}
Version:        3.39.0
Release:        %autorelease

Summary:        Platform detection module

License:        MIT
URL:            https://github.com/adafruit/Adafruit_Python_PlatformDetect
Source0:        %{pypi_source Adafruit-PlatformDetect}
BuildArch:      noarch

%description
This library provides best-guess platform detection for a range of
single-board computers and (potentially) other platforms.

%package -n     python3-%{pypi_name}
Summary:        %{summary}

BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(setuptools-scm)
%{?python_provide:%python_provide python3-%{pypi_name}}

%description -n python3-%{pypi_name}
This library provides best-guess platform detection for a range of
single-board computers and (potentially) other platforms.

%package -n python-%{pypi_name}-doc
Summary:        Documentation for adafruit-platformdetect

BuildRequires:  python3dist(sphinx)
%description -n python-%{pypi_name}-doc
Documentation for adafruit-platformdetect.

%prep
%autosetup -n Adafruit-PlatformDetect-%{version}
rm -rf %{pypi_name}.egg-info

%build
%py3_build
PYTHONPATH=${PWD} sphinx-build-3 docs html
rm -rf html/.{doctrees,buildinfo}

%install
%py3_install

%ifarch %{arm} %{arm64}
%check
%pytest -v tests
%endif

%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{python3_sitelib}/adafruit_platformdetect/
%{python3_sitelib}/Adafruit_PlatformDetect-%{version}-py%{python3_version}.egg-info/

%files -n python-%{pypi_name}-doc
%doc html
%license LICENSE

%changelog
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> 3.39.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Tue Jan 10 2023 Fabian Affolter <mail@fabian-affolter.ch> 3.39.0-1
- Update to latest upstream release 3.39.0

* Mon Jan 09 2023 Fabian Affolter <mail@fabian-affolter.ch> 3.38.0-1
- Update to latest upstream release 3.38.0 (closes rhbz#2153848)

* Sat Dec 03 2022 Fabian Affolter <mail@fabian-affolter.ch> 3.32.0-1
- Update to latest upstream release 3.32.0 (closes rhbz#2135093)

* Sat Oct 08 2022 Fabian Affolter <mail@fabian-affolter.ch> 3.31.0-1
- Update to latest upstream release 3.31.0 (closes rhbz#2132838)

* Thu Sep 22 2022 Fabian Affolter <mail@fabian-affolter.ch> 3.30.0-1
- Update to latest upstream release 3.30.0

* Wed Sep 14 2022 Fabian Affolter <mail@fabian-affolter.ch> 3.29.0-1
- Update to latest upstream release 3.29.0 (closes rhbz#2121762)

* Fri Aug 19 2022 Fabian Affolter <mail@fabian-affolter.ch> 3.27.1-1
- Update to latest upstream release 3.27.1 (closes rhbz#2107265)

* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> 3.24.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> 3.24.0-2
- Rebuilt for Python 3.11

* Sat Jun 04 2022 Fabian Affolter <mail@fabian-affolter.ch> 3.24.0-1
- Update to latest upstream release 3.24.0 (closes rhbz#2092125)

* Wed Apr 20 2022 Fabian Affolter <mail@fabian-affolter.ch> 3.22.1-1
- Update to latest upstream release 3.22.1 (closes rhbz#2071791)

* Thu Mar 17 2022 Fabian Affolter <mail@fabian-affolter.ch> 3.22.0-1
- Update to latest upstream release 3.22.0 (closes rhbz#2064459)

* Tue Mar 08 2022 Fabian Affolter <mail@fabian-affolter.ch> 3.21.0-1
- Update to latest upstream release 3.21.0 (closes rhbz#2061504)

* Wed Mar 02 2022 Fabian Affolter <mail@fabian-affolter.ch> 3.20.1-1
- Update to latest upstream release 3.20.1 (closes rhbz#2059755)

* Tue Feb 22 2022 Fabian Affolter <mail@fabian-affolter.ch> 3.20.0-1
- Update to latest upstream release 3.20.0 (closes rhbz#2051686)

* Wed Jan 26 2022 Fabian Affolter <mail@fabian-affolter.ch> 3.19.4-1
- Update to latest upstream release 3.19.4 (closes rhbz#2045923)

* Fri Jan 21 2022 Fabian Affolter <mail@fabian-affolter.ch> 3.19.3-1
- Update to latest upstream release 3.19.3 (closes rhbz#2038982)

* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> 3.19.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

* Fri Jan 07 2022 Fabian Affolter <mail@fabian-affolter.ch> 3.19.1-1
- Update to latest upstream release 3.19.1 (closes rhbz#2037038)

* Thu Dec 16 2021 Fabian Affolter <mail@fabian-affolter.ch> 3.18.0-1
- Update to latest upstream release 3.18.0 (closes rhbz#2032054)

* Fri Nov 12 2021 Fabian Affolter <mail@fabian-affolter.ch> 3.17.2-1
- Update to latest upstream release 3.17.2 (closes rhbz#2018293)

* Fri Nov 05 2021 Fabian Affolter <mail@fabian-affolter.ch> 3.17.1-1
- Update to latest upstream release 3.17.1 (closes rhbz#2018352)

* Fri Oct 22 2021 Fabian Affolter <mail@fabian-affolter.ch> 3.16.1-1
- Update to latest upstream release 3.16.1 (closes rhbz#2014226)

* Wed Oct 20 2021 Fabian Affolter <mail@fabian-affolter.ch> 3.16.0-1
- Update to latest upstream release 3.16.0 (rhbz#2014226)

* Mon Aug 09 2021 Fabian Affolter <mail@fabian-affolter.ch> 3.15.3-1
- * Mon Aug 09 2021 Fabian Affolter <mail@fabian-affolter.ch> - 3.15.3-1 -
  Update to latest upstream release 3.15.3 (rhbz#1929390)

* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> 3.13.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Sun Jun 13 2021 Fabian Affolter <mail@fabian-affolter.ch> 3.13.4-1
- * Sun Jun 13 2021 Fabian Affolter <mail@fabian-affolter.ch> - 3.13.4-1 -
  Update to latest upstream release 3.13.4 (#1929390)

* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> 3.13.3-2
- Rebuilt for Python 3.10

* Mon May 31 2021 Fabian Affolter <mail@fabian-affolter.ch> 3.13.3-1
- * Mon May 31 2021 Fabian Affolter <mail@fabian-affolter.ch> - 3.13.3-1 -
  Update to latest upstream release 3.13.3 (#1929390)

* Wed Feb 17 2021 Fabian Affolter <mail@fabian-affolter.ch> 3.1.1-1
- * Wed Feb 17 2021 Fabian Affolter <mail@fabian-affolter.ch> - 3.1.1-1 -
  Update to latest upstream release 3.1.1 (#1929390)

* Tue Feb 09 2021 Fabian Affolter <mail@fabian-affolter.ch> 3.1.0-1
- * Tue Feb 09 2021 Fabian Affolter <mail@fabian-affolter.ch> - 3.1.0-1 -
  Update to latest upstream release 2.28.0 (#1916400)

* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> 2.28.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

* Fri Jan 22 2021 Fabian Affolter <mail@fabian-affolter.ch> 2.28.0-1
- * Fri Jan 22 2021 Fabian Affolter <mail@fabian-affolter.ch> - 2.28.0-1 -
  Update to latest upstream release 2.28.0 (#1916400)

* Tue Jan 19 2021 Fabian Affolter <mail@fabian-affolter.ch> 2.27.0-1
- * Tue Jan 19 2021 Fabian Affolter <mail@fabian-affolter.ch> - 2.27.0-1 -
  Update to latest upstream release 2.27.0 (#1916400)

* Mon Jan 18 2021 Fabian Affolter <mail@fabian-affolter.ch> 2.26.0-1
- * Mon Jan 18 2021 Fabian Affolter <mail@fabian-affolter.ch> - 2.26.0-1 -
  Update to latest upstream release 2.26.0 (#1916400)

* Thu Jan 14 2021 Fabian Affolter <mail@fabian-affolter.ch> 2.25.0-1
- * Mon Jan 04 2021 Fabian Affolter <mail@fabian-affolter.ch> - 2.24.0-1 -
  Update to latest upstream release 2.24.0 (#1912539)

* Mon Jan 04 2021 Fabian Affolter <mail@fabian-affolter.ch> 2.24.0-1
- * Mon Jan 04 2021 Fabian Affolter <mail@fabian-affolter.ch> - 2.24.0-1 -
  Update to latest upstream release 2.24.0 (#1912539)

* Mon Dec 07 2020 Fabian Affolter <mail@fabian-affolter.ch> 2.23.0-1
- * Mon Dec 07 2020 Fabian Affolter <mail@fabian-affolter.ch> - 2.23.0-1 -
  Update to latest upstream release 2.23.0 (#1905200)

* Fri Dec 04 2020 Fabian Affolter <mail@fabian-affolter.ch> 2.22.2-1
- * Fri Dec 04 2020 Fabian Affolter <mail@fabian-affolter.ch> - 2.22.2-1 -
  Update to latest upstream release 2.22.2

* Fri Dec 04 2020 Fabian Affolter <mail@fabian-affolter.ch> 2.18.2-1
- * Tue Oct 20 2020 Fabian Affolter <mail@fabian-affolter.ch> - 2.18.2-1 -
  Initial package for Fedora