15
0

Accepting request 1154612 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/1154612
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-fontParts?expand=0&rev=9
This commit is contained in:
2024-03-04 20:25:37 +00:00
committed by Git OBS Bridge
3 changed files with 46 additions and 9 deletions

View File

@@ -0,0 +1,26 @@
From d7484cd98051aa1588683136da0bb99eac31523b Mon Sep 17 00:00:00 2001
From: Martin Weinelt <hexa@darmstadt.ccc.de>
Date: Wed, 7 Feb 2024 15:03:48 +0100
Subject: [PATCH] Replace remaining usage of assertEquals with assertEqual
This fixes the tests on Python 3.12, where assertEquals was removed.
---
Lib/fontParts/test/test_glyph.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/fontParts/test/test_glyph.py b/Lib/fontParts/test/test_glyph.py
index 1cad7814..20d01ae6 100644
--- a/Lib/fontParts/test/test_glyph.py
+++ b/Lib/fontParts/test/test_glyph.py
@@ -1356,9 +1356,9 @@ def test_isEmpty_false_component(self):
def test_removeOverlap(self):
glyph = self.getGlyph_generic()
- self.assertEquals(len(glyph), 2)
+ self.assertEqual(len(glyph), 2)
glyph.removeOverlap()
- self.assertEquals(len(glyph), 1)
+ self.assertEqual(len(glyph), 1)
def test_generator(test_name, metric, value):

View File

@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Sun Mar 3 18:07:37 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Build PEP517 wheel
- Clean old flavor directives
- Add fontParts-pr720-py312tests.patch gh#robotools/fontParts#720
for python312 compatibility
-------------------------------------------------------------------
Thu Dec 7 21:29:37 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file
# spec file for package python-fontParts
#
# Copyright (c) 2023 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
@@ -24,8 +24,7 @@
%define psuffix %{nil}
%bcond_with test
%endif
%define skip_python2 1
%define skip_python36 1
Name: python-fontParts%{psuffix}
Version: 0.12.1
Release: 0
@@ -33,8 +32,12 @@ Summary: API for interacting with the parts of fonts
License: MIT
URL: https://github.com/robotools/fontParts
Source: https://files.pythonhosted.org/packages/source/f/fontParts/fontParts-%{version}.zip
# PATCH-FIX-UPSTREAM fontParts-pr720-py312tests.patch gh#robotools/fontParts#720
Patch0: https://github.com/robotools/fontParts/pull/720.patch#/fontParts-pr720-py312tests.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: unzip
@@ -67,16 +70,16 @@ BuildRequires: %{python_module unicodedata2 if %python-base < 3.9}
An API for interacting with the parts of fonts during the font development process.
%prep
%setup -q -n fontParts-%{version}
%autosetup -p1 -n fontParts-%{version}
%build
export LANG=C.UTF-8
%python_build
%pyproject_wheel
%install
%if !%{with test}
export LANG=C.UTF-8
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
@@ -85,7 +88,7 @@ export LANG=C.UTF-8
%check
export LANG=C.UTF-8
export PYTHONDONTWRITEBYTECODE=1
%python_expand PYTHONPATH=./Lib $python Lib/fontParts/fontshell/test.py
%python_expand PYTHONPATH=./Lib $python Lib/fontParts/fontshell/test.py -v
%endif
%if !%{with test}
@@ -93,7 +96,7 @@ export PYTHONDONTWRITEBYTECODE=1
%doc README.rst
%license LICENSE
%{python_sitelib}/fontParts
%{python_sitelib}/fontParts-%{version}*-info
%{python_sitelib}/fontParts-%{version}.dist-info
%endif
%changelog