Skip to content

Commit f734bff

Browse files
authored
Merge pull request #8 from tgarc/master
fix python 3 support
2 parents a232b09 + b40852e commit f734bff

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

cibuildwheel/linux.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
101101
'-v', '%s:/output' % os.path.abspath(output_dir),
102102
docker_image,
103103
'/bin/bash'],
104-
stdin=subprocess.PIPE)
104+
stdin=subprocess.PIPE, universal_newlines=True)
105105

106106
docker_process.communicate(bash_script)
107107

cibuildwheel/windows.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
from __future__ import print_function
2-
import os, tempfile, subprocess, urllib2, sys
2+
import os, tempfile, subprocess, sys
3+
try:
4+
from urllib2 import urlopen
5+
except ImportError:
6+
from urllib.request import urlopen
37
from collections import namedtuple
48

59
from .util import prepare_command
@@ -10,7 +14,7 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
1014
run_with_env = os.path.join(tempfile.gettempdir(), 'appveyor_run_with_env.cmd')
1115
if not os.path.exists(run_with_env):
1216
with open(run_with_env, 'wb') as f:
13-
request = urllib2.urlopen('https://github.com/ogrisel/python-appveyor-demo/raw/09a1c8672e5015a74d8f69d07add6ee803c176ec/appveyor/run_with_env.cmd')
17+
request = urlopen('https://github.com/ogrisel/python-appveyor-demo/raw/09a1c8672e5015a74d8f69d07add6ee803c176ec/appveyor/run_with_env.cmd')
1418
f.write(request.read())
1519

1620
def shell(args, env=None, cwd=None):

0 commit comments

Comments
 (0)