Skip to content

Commit

Permalink
update qpsphere/_version.py with git_cast_file2repos.py
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Nov 6, 2019
1 parent 09a7d85 commit 9dd7319
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions qpsphere/_version.py
Expand Up @@ -37,6 +37,8 @@
Changelog
---------
2019-11-06.2
- use os.path.split instead of counting os.path.sep (Windows)
2019-11-06
- remove deprecated imp dependency (replace with parser)
- check whether this file is versioned and its location is correct
Expand All @@ -48,7 +50,7 @@
# `pragma: no cover` to ignore code coverage here.
if True: # pragma: no cover
import os
from os.path import abspath, basename, dirname, join
from os.path import abspath, basename, dirname, join, split
import subprocess
import sys
import time
Expand Down Expand Up @@ -100,7 +102,7 @@ def _minimal_ext_cmd(cmd):
# If it is under version control, it should be located
# one hierarchy down from the repository root (either
# __file__ is "docs/conf.py" or "package_name/_version.py".
if loc.count(os.path.sep) == 1:
if len(split(loc)) == 2:
try:
git_revision = _minimal_ext_cmd(['git', 'describe',
'--tags', 'HEAD'])
Expand Down

0 comments on commit 9dd7319

Please sign in to comment.