Skip to content

Commit

Permalink
now get the imports correct
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsavel committed Aug 22, 2024
1 parent f0ed903 commit 439ce56
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
7 changes: 4 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import mock

import scope

# MOCK_MODULES = [
# "numpy",
# "scipy",
Expand Down Expand Up @@ -136,9 +138,9 @@ def find_meta(meta):
# built documents.
#
# The short X.Y version.
version = find_meta("version")
version = scope.__version__
# The full version, including alpha/beta/rc tags.
release = find_meta("release")
# release = find_meta("release")

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -241,7 +243,6 @@ def find_meta(meta):
"scope Documentation",
author,
"scope",
find_meta("description"),
"Miscellaneous",
)
]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dependencies = [
dynamic = ["version"]

[tool.setuptools_scm]
write_to = "src/scope/__version__.py"
write_to = "src/scope/__version.py"

[tool.setuptools-git-versioning]
enabled = true
Expand Down
10 changes: 10 additions & 0 deletions src/scope/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
# -*- coding: utf-8 -*-
try:
from importlib.metadata import PackageNotFoundError, version
except ImportError: # for Python<3.8
from importlib_metadata import PackageNotFoundError, version

try:
__version__ = version("scope")
except PackageNotFoundError:
# package is not installed
from ._version import __version__ # type: ignore
File renamed without changes.

0 comments on commit 439ce56

Please sign in to comment.