File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ classifiers = [
3434 " Topic :: Database" ,
3535]
3636dependencies = [
37+ " importlib-metadata; python_version<'3.8'" ,
3738 " orjson>=3.11.3" ,
3839 " urllib3" ,
3940 " verlib2>=0.3.1" ,
Original file line number Diff line number Diff line change 2727 "Error" ,
2828]
2929
30- # version string read from setup.py using a regex. Take care not to break the
31- # regex!
32- __version__ = "2.0.0"
30+ # ruff: noqa: E402
31+ try :
32+ from importlib .metadata import PackageNotFoundError , version
33+ except (ImportError , ModuleNotFoundError ): # pragma: no cover
34+ from importlib_metadata import ( # type: ignore[assignment,no-redef,unused-ignore]
35+ PackageNotFoundError ,
36+ version ,
37+ )
38+
39+ __appname__ = "crate"
40+
41+ try :
42+ __version__ = version (__appname__ )
43+ except PackageNotFoundError : # pragma: no cover
44+ __version__ = "unknown"
3345
3446# codeql[py/unused-global-variable]
3547apilevel = "2.0"
You can’t perform that action at this time.
0 commit comments