Commit 51d984ab authored by Stefan Behnel's avatar Stefan Behnel

fix sdist build in Py3

parent 8b837890
...@@ -3,13 +3,13 @@ from distutils.sysconfig import get_python_lib ...@@ -3,13 +3,13 @@ from distutils.sysconfig import get_python_lib
import os, os.path import os, os.path
import sys import sys
if 'sdist' in sys.argv: if 'sdist' in sys.argv and sys.platform != "win32":
# Record the current revision in .hgrev # Record the current revision in .hgrev
import subprocess # os.popen is cleaner but depricated import subprocess # os.popen is cleaner but depricated
changset = subprocess.Popen("hg log --rev tip | grep changeset", changset = subprocess.Popen("hg log --rev tip | grep changeset",
shell=True, shell=True,
stdout=subprocess.PIPE).stdout.read() stdout=subprocess.PIPE).stdout.read()
rev = changset.split(':')[-1].strip() rev = changset.decode('ISO-8859-1').split(':')[-1].strip()
hgrev = open('.hgrev', 'w') hgrev = open('.hgrev', 'w')
hgrev.write(rev) hgrev.write(rev)
hgrev.close() hgrev.close()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment