Output warning to stderr, not stdout

This commit is contained in:
Sebastian Messmer 2016-03-02 21:22:11 +01:00
parent 5579270108
commit 5736a5ea37
2 changed files with 2 additions and 2 deletions

View File

@ -392,13 +392,13 @@ def get_root():
# versioneer.py was first imported, even in later projects.
me = os.path.realpath(os.path.abspath(__file__))
if os.path.splitext(me)[0] != os.path.splitext(versioneer_py)[0]:
# -- (MESSMER) changed this to output to stderr instead of stdout, since it caused problems on some systems --
print("Warning: build in %s is using versioneer.py from %s"
% (os.path.dirname(me), versioneer_py))
% (os.path.dirname(me), versioneer_py), file=sys.stderr)
except NameError:
pass
return root
def get_config_from_root(root):
"""Read the project setup.cfg file to determine Versioneer config."""
# This might raise EnvironmentError (if setup.cfg is missing), or