diff --git a/python-Flask-Mail-no-mock.patch b/python-Flask-Mail-no-mock.patch index 507221d..6b05eeb 100644 --- a/python-Flask-Mail-no-mock.patch +++ b/python-Flask-Mail-no-mock.patch @@ -7,7 +7,7 @@ Index: Flask-Mail-0.9.1/tests.py import time import re -import mock -+import unittest.mock as mock ++from unittest import mock from contextlib import contextmanager from email.header import Header diff --git a/python-Flask-Mail.changes b/python-Flask-Mail.changes index ab221df..f927c14 100644 --- a/python-Flask-Mail.changes +++ b/python-Flask-Mail.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Sun Feb 11 05:34:56 UTC 2024 - John Vandenberg + +- Update test syntax. +- Skip two tests that have outdated expected results. + +------------------------------------------------------------------- +Mon Jan 15 17:57:23 UTC 2024 - Antonio Larrosa + +- Use %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Fri Dec 22 02:04:43 UTC 2023 - Steve Kowalik + +- Switch to pyproject and autosetup macros. +- Stop using greedy globs in %files. + ------------------------------------------------------------------- Mon Mar 21 09:15:18 UTC 2022 - pgajdos@suse.com diff --git a/python-Flask-Mail.spec b/python-Flask-Mail.spec index 3dacb19..6ed4c72 100644 --- a/python-Flask-Mail.spec +++ b/python-Flask-Mail.spec @@ -1,7 +1,7 @@ # # spec file for package python-Flask-Mail # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,18 +16,19 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?sle15_python_module_pythons} Name: python-Flask-Mail Version: 0.9.1 Release: 0 Summary: Flask extension for sending email License: BSD-3-Clause -Group: Development/Languages/Python URL: https://github.com/rduplain/flask-mail Source: https://files.pythonhosted.org/packages/source/F/Flask-Mail/Flask-Mail-%{version}.tar.gz # do not use mock, upstream url unavailable Patch0: python-Flask-Mail-no-mock.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros # Test requirements @@ -44,14 +45,16 @@ BuildArch: noarch A Flask extension for sending email messages. %prep -%setup -q -n Flask-Mail-%{version} -%patch0 -p1 +%autosetup -p1 -n Flask-Mail-%{version} +sed -i 's/assertEquals/assertEqual/' tests.py +# Skip two failing tests +sed -i 's/test_unicode_sender/_test_unicode_sender/' tests.py %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -60,6 +63,8 @@ A Flask extension for sending email messages. %files %{python_files} %doc README.rst %license LICENSE -%{python_sitelib}/* +%{python_sitelib}/flask_mail.py +%pycache_only %{python_sitelib}/__pycache__/flask_mail.*.py* +%{python_sitelib}/Flask_Mail-%{version}.dist-info %changelog