File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 1- from pkg_resources import DistributionNotFound , get_distribution
1+ from importlib . metadata import PackageNotFoundError , version
22
33from aleph .sdk .client import AlephHttpClient , AuthenticatedAlephHttpClient
44
55try :
66 # Change here if project is renamed and does not equal the package name
7- dist_name = "aleph-sdk-python"
8- __version__ = get_distribution (dist_name ).version
9- except DistributionNotFound :
7+ __version__ = version ("aleph-sdk-python" )
8+ except PackageNotFoundError :
109 __version__ = "unknown"
11- finally :
12- del get_distribution , DistributionNotFound
1310
14- __all__ = ["AlephHttpClient" , "AuthenticatedAlephHttpClient" ]
11+ __all__ = ["__version__" , " AlephHttpClient" , "AuthenticatedAlephHttpClient" ]
1512
1613
1714def __getattr__ (name ):
You can’t perform that action at this time.
0 commit comments