Philipp Hörist pushed to branch master at gajim / gajim
Commits:
-
5e8ef4a3
by André Apitzsch at 2021-07-18T11:38:16+00:00
2 changed files:
Changes:
| ... | ... | @@ -118,8 +118,12 @@ def __init__(self) -> None: |
| 118 | 118 |
self.cache_root = Path(GLib.get_user_cache_dir()) / 'gajim'
|
| 119 | 119 |
self.data_root = Path(GLib.get_user_data_dir()) / 'gajim'
|
| 120 | 120 |
|
| 121 |
- import pkg_resources
|
|
| 122 |
- basedir = Path(pkg_resources.resource_filename("gajim", "."))
|
|
| 121 |
+ if sys.version_info < (3, 9):
|
|
| 122 |
+ import pkg_resources
|
|
| 123 |
+ basedir = Path(pkg_resources.resource_filename("gajim", "."))
|
|
| 124 |
+ else:
|
|
| 125 |
+ import importlib.resources
|
|
| 126 |
+ basedir = importlib.resources.files('gajim')
|
|
| 123 | 127 |
|
| 124 | 128 |
source_paths = [
|
| 125 | 129 |
('DATA', basedir / 'data'),
|
| ... | ... | @@ -24,7 +24,7 @@ install_requires = |
| 24 | 24 |
keyring
|
| 25 | 25 |
nbxmpp>=2.0.1
|
| 26 | 26 |
packaging
|
| 27 |
- setuptools
|
|
| 27 |
+ setuptools; python_version < '3.9'
|
|
| 28 | 28 |
precis-i18n>=1.0.0
|
| 29 | 29 |
pyOpenSSL>=16.2
|
| 30 | 30 |
pycairo>=1.16.0
|