|
| 1 | +# ================================================================= |
| 2 | +# |
| 3 | +# Terms and Conditions of Use |
| 4 | +# |
| 5 | +# Unless otherwise noted, computer program source code of this |
| 6 | +# distribution # is covered under Crown Copyright, Government of |
| 7 | +# Canada, and is distributed under the MIT License. |
| 8 | +# |
| 9 | +# The Canada wordmark and related graphics associated with this |
| 10 | +# distribution are protected under trademark law and copyright law. |
| 11 | +# No permission is granted to use them outside the parameters of |
| 12 | +# the Government of Canada's corporate identity program. For |
| 13 | +# more information, see |
| 14 | +# http://www.tbs-sct.gc.ca/fip-pcim/index-eng.asp |
| 15 | +# |
| 16 | +# Copyright title to all 3rd party software distributed with this |
| 17 | +# software is held by the respective copyright holders as noted in |
| 18 | +# those files. Users are asked to read the 3rd Party Licenses |
| 19 | +# referenced with those assets. |
| 20 | +# |
| 21 | +# Copyright (c) 2026 Tom Kralidis |
| 22 | +# |
| 23 | +# Permission is hereby granted, free of charge, to any person |
| 24 | +# obtaining a copy of this software and associated documentation |
| 25 | +# files (the "Software"), to deal in the Software without |
| 26 | +# restriction, including without limitation the rights to use, |
| 27 | +# copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 28 | +# copies of the Software, and to permit persons to whom the |
| 29 | +# Software is furnished to do so, subject to the following |
| 30 | +# conditions: |
| 31 | +# |
| 32 | +# The above copyright notice and this permission notice shall be |
| 33 | +# included in all copies or substantial portions of the Software. |
| 34 | +# |
| 35 | +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 36 | +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
| 37 | +# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 38 | +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
| 39 | +# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
| 40 | +# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 41 | +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 42 | +# OTHER DEALINGS IN THE SOFTWARE. |
| 43 | +# |
| 44 | +# ================================================================= |
| 45 | + |
| 46 | +import importlib.metadata |
| 47 | + |
| 48 | + |
| 49 | +def get_package_version() -> str: |
| 50 | + """ |
| 51 | + Helper function to get package version |
| 52 | +
|
| 53 | + :returns: `str` of version of package |
| 54 | + """ |
| 55 | + |
| 56 | + return importlib.metadata.version('pygeometa') |
0 commit comments