## START: Set by rpmautospec
## (rpmautospec version 0.6.0)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 4;
    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 palettable

%global _description %{expand:
Palettable (formerly brewer2mpl) is a library of color palettes for Python.

It's written in pure Python with no dependencies, but it can supply
color maps for matplotlib. You can use Palettable to customize matplotlib
plots or supply colors for a web application.}

Name:           python-%{pypi_name}
Version:        3.3.3
Release:        %{autorelease}
Summary:        Library of color palettes for Python
BuildArch:      noarch

License:        MIT AND BSD-2-Clause AND Apache-2.0
URL:            https://pypi.org/pypi/%{pypi_name}
Source0:        %{pypi_source %{pypi_name}}
# https://github.com/jiffyclub/palettable/pull/52
Patch0:         limit_find_to_palettable_dir.patch

%description %_description

%package -n python3-%{pypi_name}
Summary:        %{summary}
BuildRequires:  python3-devel
BuildRequires:  python3-pytest
BuildRequires:  git-core

%description -n python3-%{pypi_name} %_description


%prep
%autosetup -p1 -n %{pypi_name}-%{version} -S git

%generate_buildrequires
%pyproject_buildrequires


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files %{pypi_name}


%check
%{pytest}


%files -n python3-%{pypi_name} -f %{pyproject_files}
%doc README.rst
%license license.txt
%license palettable/colorbrewer/data/colorbrewer_licence.txt

%changelog
## START: Generated by rpmautospec
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

* Thu Jun 29 2023 Sandro <devel@penguinpee.nl> - 3.3.3-1
- Update to 3.3.3 (RHBZ#2188160)

* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 3.3.2-2
- Rebuilt for Python 3.12

* Tue Apr 18 2023 Sandro <devel@penguinpee.nl> - 3.3.2-1
- Update to 3.3.2 (RHBZ#2187109)

* Wed Apr 12 2023 Sandro <devel@penguinpee.nl> - 3.3.1-1
- Update to 3.3.1 (RHBZ#2184879)

* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Wed Nov 23 2022 Sandro <devel@penguinpee.nl> - 3.3.0-3
- Use %%pypi_name throughout

* Tue Oct 18 2022 Sandro <devel@penguinpee.nl> - 3.3.0-2
- Fix trailing space in sources file

* Mon Oct 17 2022 Sandro <devel@penguinpee.nl> - 3.3.0-1
- Initial release (RHBZ#2130025)
## END: Generated by rpmautospec