Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyproject.toml export-subst
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ dependencies = [
"backports.zoneinfo<1; python_version<'3.9'",
"crate>=2,<3",
"geojson<4,>=2.5",
"importlib-metadata; python_version<'3.8'",
"importlib-resources; python_version<'3.9'",
"sqlalchemy<2.1,>=1",
"verlib2<0.3",
Expand Down Expand Up @@ -252,8 +253,9 @@ non_interactive = true
# enable_recursive_aliases = true

[tool.versioningit.vcs]
method = "git"
method = "git-archive"
default-tag = "0.0.0"
describe-subst = "$Format:%(describe:tags)$"

# ===================
# Tasks configuration
Expand Down
15 changes: 15 additions & 0 deletions src/sqlalchemy_cratedb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,22 @@
monkeypatch_add_exec_driver_sql()


try:
from importlib.metadata import PackageNotFoundError, version
except (ImportError, ModuleNotFoundError): # pragma:nocover
from importlib_metadata import ( # type: ignore[assignment,no-redef,unused-ignore]
PackageNotFoundError,
version,
)

try:
__version__ = version("sqlalchemy-cratedb")
except PackageNotFoundError: # pragma: no cover
__version__ = "unknown"


__all__ = [
__version__,
dialect,
FloatVector,
Geopoint,
Expand Down