File: version.py

package info (click to toggle)
pyerfa 1.7.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,652 kB
  • sloc: ansic: 30,690; sh: 4,242; python: 2,349; makefile: 78
file content (35 lines) | stat: -rw-r--r-- 1,086 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""Wrapper, ERFA and SOFA version information."""

# NOTE: First try _dev.scm_version if it exists and setuptools_scm is installed
# This file is not included in pyerfa wheels/tarballs, so otherwise it will
# fall back on the generated _version module.
try:
    try:
        from ._dev.scm_version import get_version as _get_version
        _version = _get_version()
        del _get_version
    except ImportError:
        from ._version import version as _version
except Exception:
    import warnings
    warnings.warn(
        f'could not determine {__name__.split(".")[0]} package version; '
        f'this indicates a broken installation')
    del warnings

    _version = '0.0.0'

# Set the version numbers a bit indirectly, so that Sphinx can pick up
# up the docstrings and list the values.
from . import ufunc

version = _version
'''Version of the python wrappers.'''

erfa_version = ufunc.erfa_version
'''Version of the C ERFA library that is wrapped.'''

sofa_version = ufunc.sofa_version
'''Version of the SOFA library the ERFA library is based on.'''

del ufunc, _version