Commit 58aef457 authored by tarek's avatar tarek

make sure manual_test can be used under 2.3

--HG--
branch : distribute
extra : rebase_source : 0186c52fe9d753201828f54f5e6b348829eb4821
parent b9574657
......@@ -7,11 +7,25 @@ if sys.version_info[0] >= 3:
import os
import shutil
import tempfile
import subprocess
from distutils.command.install import INSTALL_SCHEMES
from string import Template
from urllib2 import urlopen
import subprocess
try:
import subprocess
def _system_call(*args):
assert subprocess.call(args) == 0
except ImportError:
# Python 2.3
def _system_call(*args):
# quoting arguments if windows
if sys.platform == 'win32':
def quote(arg):
if ' ' in arg:
return '"%s"' % arg
return arg
args = [quote(arg) for arg in args]
assert os.system(' '.join(args)) == 0
def tempdir(func):
def _tempdir(*args, **kwargs):
......@@ -49,8 +63,6 @@ if sys.platform == 'win32':
else:
PURELIB = INSTALL_SCHEMES['unix_prefix']['purelib']
def _system_call(*args):
assert subprocess.call(args) == 0
@tempdir
def test_virtualenv():
......
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