File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 2
2
cf-pandas: an accessor for pandas objects that interprets CF attributes
3
3
"""
4
4
5
- from pkg_resources import DistributionNotFound , get_distribution
5
+ from importlib . metadata import PackageNotFoundError , version
6
6
7
7
from .accessor import CFAccessor # noqa
8
8
from .options import set_options # noqa
12
12
from .widget import Selector , dropdown
13
13
14
14
try :
15
- __version__ = get_distribution ("cf-pandas" ). version
16
- except DistributionNotFound :
15
+ __version__ = version ("cf-pandas" )
16
+ except PackageNotFoundError :
17
17
# package is not installed
18
- __version__ = "unknown"
18
+ pass
Original file line number Diff line number Diff line change 18
18
# |version| and |release|, also used in various other places throughout the
19
19
# built documents.
20
20
# see https://pypi.org/project/setuptools-scm/ for details
21
- from pkg_resources import get_distribution
21
+ from importlib . metadata import version as imversion
22
22
23
23
print ("python exec:" , sys .executable )
24
24
print ("sys.path:" , sys .path )
31
31
# -- Project information -----------------------------------------------------
32
32
33
33
project = "cf-pandas"
34
- copyright = "2022, Axiom Data Science"
34
+ copyright = "2022–2023 , Axiom Data Science"
35
35
author = "Axiom Data Science"
36
36
37
- release = get_distribution ( "cf_pandas" ). version
37
+ release = imversion ( "cf-pandas" )
38
38
# for example take major/minor
39
39
version = "." .join (release .split ("." )[:2 ])
40
40
You can’t perform that action at this time.
0 commit comments