Commit 5e8ef4a3 authored by André's avatar André Committed by Philipp Hörist
Browse files

Replace discouraged pkg_resources for Python 3.9+

See https://setuptools.readthedocs.io/en/latest/pkg_resources.html
parent 15cf0e2a
Pipeline #8047 passed with stages
in 7 minutes and 5 seconds
......@@ -118,8 +118,12 @@ def __init__(self) -> None:
self.cache_root = Path(GLib.get_user_cache_dir()) / 'gajim'
self.data_root = Path(GLib.get_user_data_dir()) / 'gajim'
import pkg_resources
basedir = Path(pkg_resources.resource_filename("gajim", "."))
if sys.version_info < (3, 9):
import pkg_resources
basedir = Path(pkg_resources.resource_filename("gajim", "."))
else:
import importlib.resources
basedir = importlib.resources.files('gajim')
source_paths = [
('DATA', basedir / 'data'),
......
......@@ -24,7 +24,7 @@ install_requires =
keyring
nbxmpp>=2.0.1
packaging
setuptools
setuptools; python_version < '3.9'
precis-i18n>=1.0.0
pyOpenSSL>=16.2
pycairo>=1.16.0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment