-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
6 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
# Try to use setuptools_scm to get the current version; this is only used | ||
# in development installations from the git repository. | ||
import os.path | ||
import os.path as pth | ||
|
||
try: | ||
from setuptools_scm import get_version | ||
|
||
version = get_version(root=os.path.join("..", ".."), relative_to=__file__) | ||
except ImportError: | ||
raise ImportError("setuptools_scm not installed") | ||
version = get_version(root=pth.join("..", ".."), relative_to=__file__) | ||
except Exception as e: | ||
raise ValueError(f"setuptools_scm broken with {e}") | ||
raise ImportError(f"setuptools_scm broken or not installed, {e}") |