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"