diff --git a/_multibuild b/_multibuild
deleted file mode 100644
index fcc7b97..0000000
--- a/_multibuild
+++ /dev/null
@@ -1,3 +0,0 @@
-
- test
-
diff --git a/python-wcwidth.changes b/python-wcwidth.changes
index c00d56c..96a4898 100644
--- a/python-wcwidth.changes
+++ b/python-wcwidth.changes
@@ -1,3 +1,11 @@
+-------------------------------------------------------------------
+Mon Jul 18 13:40:16 UTC 2022 - Steve Kowalik
+
+- Add patch remove-pkg_resources.patch:
+ * Use importlib.metadata rather than pkg_resources.
+- Since importlib.metadata is not as a stickler as pkg_resources is, remove
+ multibuild.
+
-------------------------------------------------------------------
Wed Jun 2 08:42:23 UTC 2021 - Christophe Giboudeaux
diff --git a/python-wcwidth.spec b/python-wcwidth.spec
index 41e21eb..acb9db8 100644
--- a/python-wcwidth.spec
+++ b/python-wcwidth.spec
@@ -1,7 +1,7 @@
#
-# spec file for package python
+# spec file for package python-wcwidth
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,33 +17,24 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%global flavor @BUILD_FLAVOR@%{nil}
-%if "%{flavor}" == "test"
-%define psuffix -%{flavor}
-%bcond_without test
-%else
-%define psuffix %{nil}
-%bcond_with test
-%endif
%bcond_without python2
-Name: python-wcwidth%{psuffix}
+Name: python-wcwidth
Version: 0.2.5
Release: 0
Summary: Number of Terminal column cells of wide-character codes
License: MIT
URL: https://github.com/jquast/wcwidth
Source: https://github.com/jquast/wcwidth/archive/%{version}.tar.gz#/wcwidth-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM gh#jquast/wcwidth#62
+Patch0: remove-pkg_resources.patch
+BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
-%if %{with test}
-BuildRequires: %{python_module pytest}
-BuildRequires: %{python_module wcwidth >= %{version}}
%if %{with python2}
BuildRequires: python-backports.functools_lru_cache >= 1.2.1
%endif
-%endif
%ifpython2
Requires: python-backports.functools_lru_cache >= 1.2.1
%endif
@@ -63,7 +54,7 @@ commonly many releases older than the most current Unicode Standard
release files, which this project aims to track.
%prep
-%setup -q -n wcwidth-%{version}
+%autosetup -p1 -n wcwidth-%{version}
sed -i 's/--cov[-=a-z]*//g' tox.ini
# this option is nonsense
sed -i 's/looponfailroots.*//' tox.ini
@@ -72,21 +63,15 @@ sed -i 's/looponfailroots.*//' tox.ini
%python_build
%install
-%if ! %{with test}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
-%endif
%check
-%if %{with test}
%pytest tests
-%endif
-%if ! %{with test}
%files %{python_files}
%license LICENSE
%doc docs/intro.rst
%{python_sitelib}/*
-%endif
%changelog
diff --git a/remove-pkg_resources.patch b/remove-pkg_resources.patch
new file mode 100644
index 0000000..f62eaf2
--- /dev/null
+++ b/remove-pkg_resources.patch
@@ -0,0 +1,51 @@
+Index: wcwidth-0.2.5/tests/test_core.py
+===================================================================
+--- wcwidth-0.2.5.orig/tests/test_core.py
++++ wcwidth-0.2.5/tests/test_core.py
+@@ -1,7 +1,10 @@
+ # coding: utf-8
+ """Core tests for wcwidth module."""
+ # 3rd party
+-import pkg_resources
++try:
++ import importlib.metadata as importmeta
++except ImportError:
++ import importlib_metadata as importmeta
+
+ # local
+ import wcwidth
+@@ -10,7 +13,7 @@ import wcwidth
+ def test_package_version():
+ """wcwidth.__version__ is expected value."""
+ # given,
+- expected = pkg_resources.get_distribution('wcwidth').version
++ expected = importmeta.version('wcwidth')
+
+ # exercise,
+ result = wcwidth.__version__
+Index: wcwidth-0.2.5/tests/test_ucslevel.py
+===================================================================
+--- wcwidth-0.2.5.orig/tests/test_ucslevel.py
++++ wcwidth-0.2.5/tests/test_ucslevel.py
+@@ -6,7 +6,6 @@ import warnings
+
+ # 3rd party
+ import pytest
+-import pkg_resources
+
+ # local
+ import wcwidth
+Index: wcwidth-0.2.5/setup.py
+===================================================================
+--- wcwidth-0.2.5.orig/setup.py
++++ wcwidth-0.2.5/setup.py
+@@ -52,7 +52,8 @@ def main():
+ author='Jeff Quast',
+ author_email='contact@jeffquast.com',
+ install_requires=('backports.functools-lru-cache>=1.2.1;'
+- 'python_version < "3.2"'),
++ 'python_version < "3.2"',
++ 'importlib_metadata;python_version < "3.8"'),
+ license='MIT',
+ packages=['wcwidth'],
+ url='https://github.com/jquast/wcwidth',