|
1 | 1 | #!/usr/bin/env python |
2 | | -# -*- coding: utf-8 -*- |
3 | | -####### |
4 | | -# actinia-python-client is a python client for actinia - an open source REST |
5 | | -# API for scalable, distributed, high performance processing of geographical |
6 | | -# data that uses GRASS GIS for computational tasks. |
7 | | -# |
8 | | -# Copyright (c) 2022 mundialis GmbH & Co. KG |
9 | | -# |
10 | | -# This program is free software: you can redistribute it and/or modify |
11 | | -# it under the terms of the GNU General Public License as published by |
12 | | -# the Free Software Foundation, either version 3 of the License, or |
13 | | -# (at your option) any later version. |
14 | | -# |
15 | | -# This program is distributed in the hope that it will be useful, |
16 | | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 | | -# GNU General Public License for more details. |
19 | | -# |
20 | | -# You should have received a copy of the GNU General Public License |
21 | | -# along with this program. If not, see <https://www.gnu.org/licenses/>. |
22 | | -# |
23 | | -####### |
| 2 | + |
| 3 | +"""Initialize the actinia-python-client package. |
| 4 | +
|
| 5 | +actinia-python-client is a python client for actinia - an open source REST |
| 6 | +API for scalable, distributed, high performance processing of geographical |
| 7 | +data that uses GRASS GIS for computational tasks. |
| 8 | +
|
| 9 | +Copyright (c) 2022-2025 mundialis GmbH & Co. KG |
| 10 | +
|
| 11 | +This program is free software: you can redistribute it and/or modify |
| 12 | +it under the terms of the GNU General Public License as published by |
| 13 | +the Free Software Foundation, either version 3 of the License, or |
| 14 | +(at your option) any later version. |
| 15 | +
|
| 16 | +This program is distributed in the hope that it will be useful, |
| 17 | +but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | +GNU General Public License for more details. |
| 20 | +
|
| 21 | +You should have received a copy of the GNU General Public License |
| 22 | +along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 23 | +""" |
24 | 24 |
|
25 | 25 | __license__ = "GPLv3" |
26 | 26 | __author__ = "Anika Weinmann" |
27 | | -__copyright__ = "Copyright 2022, mundialis GmbH & Co. KG" |
| 27 | +__copyright__ = "Copyright 2022-2025, mundialis GmbH & Co. KG" |
28 | 28 | __maintainer__ = "Anika Weinmann" |
29 | 29 |
|
30 | | -from pkg_resources import get_distribution, DistributionNotFound |
| 30 | +from importlib.metadata import PackageNotFoundError, version |
| 31 | + |
31 | 32 | from actinia.actinia import Actinia as Actinia |
32 | 33 |
|
33 | 34 | try: |
34 | 35 | # Change here if project is renamed and does not equal the package name |
35 | | - dist_name = __name__ |
36 | | - __version__ = get_distribution(dist_name).version |
37 | | -except DistributionNotFound: |
| 36 | + __version__ = version(__name__).version |
| 37 | +except PackageNotFoundError: |
38 | 38 | __version__ = "unknown" |
39 | 39 | finally: |
40 | | - del get_distribution, DistributionNotFound |
| 40 | + del version, PackageNotFoundError |
0 commit comments