From ab45b5742d738d7db9681ab03cc5aab6217577e5 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Sat, 2 Mar 2024 01:43:21 +0200 Subject: [PATCH] gdrivefs: fix version logic (#41) --- .gitignore | 2 ++ gdrivefs/__init__.py | 8 +++++--- pyproject.toml | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5a07026..2077cee 100644 --- a/.gitignore +++ b/.gitignore @@ -104,3 +104,5 @@ ENV/ # mypy .mypy_cache/ + +/gdrivefs/_version.py diff --git a/gdrivefs/__init__.py b/gdrivefs/__init__.py index f7cd40f..fc21fef 100644 --- a/gdrivefs/__init__.py +++ b/gdrivefs/__init__.py @@ -1,5 +1,7 @@ -from ._version import get_versions -__version__ = get_versions()['version'] -del get_versions +try: + from ._version import version as __version__ +except ImportError: + __version__ = "0.dev" + from .core import GoogleDriveFileSystem diff --git a/pyproject.toml b/pyproject.toml index e80b317..da8a2e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,3 +37,4 @@ Source = "http://github.com/fsspec/gdrivefs" packages = ["gdrivefs", "gdrivefs.tests"] [tool.setuptools_scm] +version_file = "gdrivefs/_version.py"