Now verify-manifest.py is windows-compatible again

This commit is contained in:
Jeppe Klitgaard committed 2015-04-06 01:25:16 +02:00
1 parent c35a887e1a
commit e31bfb58f0
2 files changed
+12 -12

No files matched your search

+9 -9
View File
@@ -1,28 +1,28 @@
"""
Exits with exit code 0 if manifest was verified.
"""
from sh import check_manifest
from sh import ErrorReturnCode_1
import sys
import subprocess
import errno
import os
EXPECTED_OUTPUT = "lists of files in version control and sdist match"
os.chdir("..") # Leave bin/
def verify_manifest():
"""
Returns a ``str`` containing output from ``check-manifest``.
"""
try:
output = check_manifest().decode()
except ErrorReturnCode_1 as e:
output = e.stderr.decode() + e.stdout.decode()
output = subprocess.check_output("check-manifest",
stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
output = e.output
return output
return output.decode().strip()
if __name__ == '__main__':
output = verify_manifest()
print(output)
if output == EXPECTED_OUTPUT:
+3 -3
View File
@@ -36,7 +36,7 @@ deps =
[testenv:flake8]
basepython = python3.4
commands =
flake8 minecraft tests setup.py
flake8 minecraft tests bin/*.py setup.py start.py
deps =
{[testenv]deps}
flake8
@@ -70,7 +70,7 @@ commands =
basepython = python3.4
deps =
check-manifest
sh
changedir = bin
commands =
python {toxinidir}/bin/verify-manifest.py
python verify-manifest.py