## START: Set by rpmautospec
## (rpmautospec version 0.6.0)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
    release_number = 20;
    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-aiomqtt
Version:        0.1.3
Release:        %autorelease
Summary:        An AsyncIO asynchronous wrapper around paho-mqtt

# Eclipse Distribution License 1.0 is BSD-3-Clause. Upstream states:
#
#   This project is dual licensed under the Eclipse Public License 1.0 and the
#   Eclipse Distribution License 1.0 as described in the epl-v10 and edl-v10
#   files.
#
# and https://www.eclipse.org/legal/eplfaq.php#DUALLIC clarifies:
#
#   For Eclipse projects which are dual-licensed, your file headers state that
#   the code is being made available under two licenses. For example: "This
#   program and the accompanying materials are made available under the terms
#   of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
#   which accompanies this distribution." What is meant by the use of the
#   conjunction "and"?
#
#   The code is being made available under both of the licenses. The consumer
#   of the code can select which license terms they wish to use, modify and/or
#   further distribute the code under.
#
# Therefore upstream’s “and” is our “or”.
License:        EPL-1.0 OR BSD-3-Clause
URL:            https://github.com/mossblaser/aiomqtt
Source:         %{url}/archive/v%{version}/aiomqtt-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  python3-devel

# Additional requirements for tests
BuildRequires:  mosquitto

%global common_description %{expand:
This library implements a minimal Python 3 asyncio wrapper around the MQTT
client in paho-mqtt.}

%description %{common_description}


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

%description -n python3-aiomqtt %{common_description}


%prep
%autosetup -n aiomqtt-%{version}
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters
sed -r -i '/\b(flake8)\b/d' requirements-test.txt


%generate_buildrequires
%pyproject_buildrequires -t


%build
%pyproject_wheel


%install
%pyproject_install
%pyproject_save_files aiomqtt


%check
%pytest


%files -n python3-aiomqtt -f %{pyproject_files}
%license LICENSE.txt edl-v10 epl-v10
%doc README.md


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

* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.3-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

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

* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 0.1.3-17
- Rebuilt for Python 3.12

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

* Thu Oct 20 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.3-14
- Update License to SPDX

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

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

* Fri Apr 22 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.3-11
- Patch out flake8 dependency

* Wed Apr 20 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.3-10
- Drop “forge” macros, which aren’t doing much here

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

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

* Wed Sep 08 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.3-7
- Reduce macro indirection in the spec file

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

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

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

* Sun May 23 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.3-2
- Fix defective changelog entry

* Sun May 23 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.3-1
- Update to 0.1.3
- Drop 0001-Drop-dependency-on-PyPI-mock-package-use-unittest.mo.patch (PR#11
  now upstream)

* Fri May 21 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.2-3
- Switch to pyproject-rpm-macros

* Thu May 20 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.1.2-2
- General spec file cleanup
- Fix License field, and update to an upstream commit that includes needed
  license text files
- Use %%pytest macro to run the tests
- Patch out dependency on deprecated Python mock package

* Tue Mar 09 2021 Fabian Affolter <mail@fabian-affolter.ch> - 0.1.2-1
- Update to latest upstream release 0.1.2

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

* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

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

* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Fri Jan 10 2020 Fabian Affolter <mail@fabian-affolter.ch> - 0.1.1-2
- Better use of wildcards (rhbz#1786958)

* Sun Dec 29 2019 Fabian Affolter <mail@fabian-affolter.ch> - 0.1.1-1
- Initial package for Fedora

## END: Generated by rpmautospec