forked from pool/python-asciimatics
- Drop patch python-asciimatics-no-mock.patch, has been subsummed.
- Add patch move-to-python3.patch - Switch to autosetup and pyproject macros. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-asciimatics?expand=0&rev=17
This commit is contained in:
3277
move-to-python3.patch
Normal file
3277
move-to-python3.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,56 +0,0 @@
|
||||
Index: asciimatics-1.13.0/tests/test_effects.py
|
||||
===================================================================
|
||||
--- asciimatics-1.13.0.orig/tests/test_effects.py 2020-09-18 16:37:11.000000000 +0200
|
||||
+++ asciimatics-1.13.0/tests/test_effects.py 2022-03-07 13:53:31.271205331 +0100
|
||||
@@ -1,7 +1,7 @@
|
||||
from builtins import chr
|
||||
import unittest
|
||||
from datetime import datetime
|
||||
-from mock.mock import MagicMock, patch
|
||||
+from unittest.mock import MagicMock, patch
|
||||
from random import randint
|
||||
import os
|
||||
import sys
|
||||
Index: asciimatics-1.13.0/tests/test_particles.py
|
||||
===================================================================
|
||||
--- asciimatics-1.13.0.orig/tests/test_particles.py 2020-09-18 16:37:11.000000000 +0200
|
||||
+++ asciimatics-1.13.0/tests/test_particles.py 2022-03-07 13:54:14.599457606 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
import unittest
|
||||
-from mock.mock import MagicMock
|
||||
+from unittest.mock import MagicMock
|
||||
from asciimatics.particles import ShootScreen, DropScreen, Explosion, Rain, \
|
||||
StarFirework, PalmFirework, RingFirework, SerpentFirework
|
||||
from asciimatics.screen import Screen, Canvas
|
||||
Index: asciimatics-1.13.0/tests/test_screen.py
|
||||
===================================================================
|
||||
--- asciimatics-1.13.0.orig/tests/test_screen.py 2021-03-06 18:11:13.000000000 +0100
|
||||
+++ asciimatics-1.13.0/tests/test_screen.py 2022-03-07 13:54:48.895656238 +0100
|
||||
@@ -5,7 +5,7 @@ from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
-from mock import MagicMock
|
||||
+from unittest.mock import MagicMock
|
||||
from random import randint
|
||||
import unittest
|
||||
import sys
|
||||
Index: asciimatics-1.13.0/tests/test_widgets.py
|
||||
===================================================================
|
||||
--- asciimatics-1.13.0.orig/tests/test_widgets.py 2021-04-05 16:20:35.000000000 +0200
|
||||
+++ asciimatics-1.13.0/tests/test_widgets.py 2022-03-07 13:58:16.396856253 +0100
|
||||
@@ -5,13 +5,12 @@ from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
from datetime import date, time
|
||||
from time import sleep
|
||||
-from mock import patch
|
||||
+from unittest.mock import MagicMock,patch
|
||||
from builtins import ord
|
||||
from builtins import chr
|
||||
from builtins import str
|
||||
import unittest
|
||||
import sys
|
||||
-from mock.mock import MagicMock
|
||||
from asciimatics.event import KeyboardEvent, MouseEvent
|
||||
from asciimatics.exceptions import NextScene, StopApplication, InvalidFields
|
||||
from asciimatics.scene import Scene
|
||||
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 11 04:59:40 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Drop patch python-asciimatics-no-mock.patch, has been subsummed.
|
||||
- Add patch move-to-python3.patch
|
||||
- Switch to autosetup and pyproject macros.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 29 16:38:23 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-asciimatics
|
||||
#
|
||||
# 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,30 +16,28 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-asciimatics
|
||||
Version: 1.14.0
|
||||
Release: 0
|
||||
Summary: Package to replace curses and create ASCII animations
|
||||
License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/peterbrittain/asciimatics
|
||||
Source: https://files.pythonhosted.org/packages/source/a/asciimatics/asciimatics-%{version}.tar.gz
|
||||
# https://github.com/peterbrittain/asciimatics/issues/347
|
||||
Patch0: python-asciimatics-no-mock.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
# PATCH-FIX-UPSTREAM Based on gh#peterbrittain/asciimatics#376
|
||||
Patch0: move-to-python3.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools_scm}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-Pillow >= 2.7.0
|
||||
Requires: python-curses
|
||||
Requires: python-future
|
||||
Requires: python-pyfiglet >= 0.7.2
|
||||
Requires: python-wcwidth
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module Pillow >= 2.7.0}
|
||||
BuildRequires: %{python_module curses}
|
||||
BuildRequires: %{python_module future}
|
||||
BuildRequires: %{python_module pyfiglet >= 0.7.2}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module wcwidth}
|
||||
@@ -51,15 +49,13 @@ Asciimatics is a package to help people create full-screen text UIs
|
||||
(from interactive forms to ASCII animations) on any platform.
|
||||
|
||||
%prep
|
||||
%setup -q -n asciimatics-%{version}
|
||||
%autopatch -p1
|
||||
sed -i '/setup_requires/d' setup.py
|
||||
%autosetup -p1 -n asciimatics-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
@@ -69,6 +65,7 @@ sed -i '/setup_requires/d' setup.py
|
||||
%files %{python_files}
|
||||
%doc CHANGES.rst README.rst doc/source/*.rst doc/source/*.png
|
||||
%license LICENSE
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/asciimatics
|
||||
%{python_sitelib}/asciimatics-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user