Make versioneer work from subdirectory
This commit is contained in:
parent
5f3b28262c
commit
f69cc4492f
3
.gitignore
vendored
3
.gitignore
vendored
@ -4,3 +4,6 @@ umltest.status
|
|||||||
/cmake
|
/cmake
|
||||||
/.idea
|
/.idea
|
||||||
*~
|
*~
|
||||||
|
|
||||||
|
gitversion/*.pyc
|
||||||
|
gitversion/__pycache__
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
import versioneer
|
import versioneer
|
||||||
|
|
||||||
print versioneer.get_version()
|
print(versioneer.get_version())
|
||||||
|
@ -1048,7 +1048,8 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
|
|||||||
expanded, and _version.py hasn't already been rewritten with a short
|
expanded, and _version.py hasn't already been rewritten with a short
|
||||||
version string, meaning we're inside a checked out source tree.
|
version string, meaning we're inside a checked out source tree.
|
||||||
"""
|
"""
|
||||||
if not os.path.exists(os.path.join(root, ".git")):
|
# -- (MESSMER) CHANGED FOLLOWING LINE TO LOOK FOR ../.git instead of .git --
|
||||||
|
if not os.path.exists(os.path.join(root, "../.git")):
|
||||||
if verbose:
|
if verbose:
|
||||||
print("no .git in %s" % root)
|
print("no .git in %s" % root)
|
||||||
raise NotThisMethod("no .git directory")
|
raise NotThisMethod("no .git directory")
|
||||||
|
Loading…
Reference in New Issue
Block a user