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

Name:           python-pgspecial
Version:        2.1.3
Release:        %autorelease
Summary:        Python implementation of postgres meta (backslash) commands

License:        BSD-3-Clause
URL:            https://www.dbcli.com
Source:         %{pypi_source pgspecial}
BuildArch:      noarch

BuildRequires:  python3-devel

%global common_description %{expand:
This package provides an API to execute meta-commands (AKA “special”, or
“backslash commands”) on PostgreSQL.}

%description %{common_description}


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

# Workaround for missing dependency for pure-Python implementation and missing
# python_c module in python-psycopg3,
# https://bugzilla.redhat.com/show_bug.cgi?id=2266555.
# This can be removed after Fedora 41 reaches end-of-life.
Requires:       python-psycopg3 >= 3.1.19-1

%description -n python3-pgspecial %{common_description}


%prep
%autosetup -p1 -n pgspecial-%{version}


%generate_buildrequires
%pyproject_buildrequires -t


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files pgspecial


%check
# Note that most tests will be skipped since there is not a postgres database
# we can connect to.
%pytest


%files -n python3-pgspecial -f %{pyproject_files}
%license License.txt
%doc README.rst
%doc changelog.rst
%doc DEVELOP.rst


%changelog
## START: Generated by rpmautospec
* Tue Nov 26 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 2.1.3-1
- Update to 2.1.3 (close RHBZ#2328854)

* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild

* Sun Jun 09 2024 Python Maint <python-maint@redhat.com> - 2.1.1-6
- Rebuilt for Python 3.13

* Mon Apr 01 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 2.1.1-5
- Work around a python-psycopg3 package bug

* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

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

* Wed Nov 01 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 2.1.1-1
- Update to 2.1.1 (close RHBZ#2246889)

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

* Mon Jul 03 2023 Python Maint <python-maint@redhat.com> - 2.1.0-3
- Rebuilt for Python 3.12

* Fri Mar 31 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 2.1.0-1
- Update to 2.1.0 (close RHBZ#2183523)

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

* Thu Nov 03 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 2.0.1-1
- Update to 2.0.1 (close RHBZ#2093504)

* Thu Nov 03 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1.13.1-5
- Update License to SPDX

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

* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 1.13.1-3
- Rebuilt for Python 3.11

* Sat Apr 16 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1.13.1-2
- Stop numbering patches

* Tue Mar 01 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 1.13.1-1
- Update to 1.13.1 (close RHBZ#2059332)

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

* Sun Sep 12 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 1.13.0-9
- Use patch generated directly from GitHub PR

* Sun Sep 12 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 1.13.0-8
- Use patch generated directly from GitHub PR

* Sun Sep 12 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 1.13.0-7
- Drop BR on pyproject-rpm-macros, now implied by python3-devel

* Sun Sep 12 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 1.13.0-6
- Reduce macro indirection in the spec file

* Tue Jul 27 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 1.13.0-5
- Move %%generate_buildrequires after %%prep to make the spec file easier
  to follow

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

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

* Fri May 21 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 1.13.0-1
- Update to 1.13.0
- Update summary and description
- Use a patch to drop the mock dependency, and submit PR#115 upstream
- Generate test BR’s from tox.ini

* Sat Apr 10 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 1.12.1-5
- Drop workarounds for Fedora 32

* Tue Mar 16 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 1.12.1-4
- Drop python3dist(setuptools) BR, redundant with pyproject-rpm-macros

* Tue Mar 02 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 1.12.1-3
- Use pyproject-rpm-macros, including generated BR’s

* Tue Mar 02 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 1.12.1-2
- Add version and comment for python3dist(configobj) dependency

* Tue Mar 02 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 1.12.1-1
- New upstream release 1.12.1
- Add changelog to doc-files

* Tue Mar 02 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 1.11.10-5
- Use srcname instead of pypi_name
- Add common_description macro
- Drop obsolete python_provide macro
- Drop scripts/README.rst from doc-files, and add DEVELOP.rst
- Use %%pytest macro
- Drop explicit/manual Requires, which are redundant with automatic Python
  dependency generation

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

* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.11.10-2
- Rebuilt for Python 3.9

* Sun May 10 2020 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 1.11.10-1
- Initial package.

## END: Generated by rpmautospec