From 366b58e01f15b6192fcedd07ccfcfce1b2bae443f6920dd3d7c702149ee19cbd Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 22 Dec 2023 02:05:37 +0000 Subject: [PATCH] - Switch to pyproject and autosetup macros. - Stop using greedy globs in %files. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:flask/python-Flask-Mail?expand=0&rev=9 --- python-Flask-Mail-no-mock.patch | 2 +- python-Flask-Mail.changes | 6 ++++++ python-Flask-Mail.spec | 17 +++++++++-------- 3 files changed, 16 insertions(+), 9 deletions(-) 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..37b0e52 100644 --- a/python-Flask-Mail.changes +++ b/python-Flask-Mail.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +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..d11b465 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) 2023 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,18 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} 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 +44,13 @@ BuildArch: noarch A Flask extension for sending email messages. %prep -%setup -q -n Flask-Mail-%{version} -%patch0 -p1 +%autosetup -p1 -n Flask-Mail-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -60,6 +59,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