Skip to content

Commit 95b4a6a

Browse files
committed
Make import paddle.fluid possible now
1 parent 48fef01 commit 95b4a6a

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

paddle/scripts/paddle_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function cmake_gen() {
7979
-DPYTHON_INCLUDE_DIR:PATH=/opt/python/cp27-cp27mu/include/python2.7
8080
-DPYTHON_LIBRARIES:FILEPATH=/opt/_internal/cpython-2.7.11-ucs4/lib/libpython2.7.so"
8181
elif [ "$1" == "cp35-cp35m" ]; then
82-
export LD_LIBRARY_PATH=/opt/_internal/cpython-3.5.1/lib/
82+
export LD_LIBRARY_PATH=/opt/_internal/cpython-3.5.1/lib/:${LD_LIBRARY_PATH}
8383
export PATH=/opt/_internal/cpython-3.5.1/bin/:${PATH}
8484
export PYTHON_FLAGS="-DPYTHON_EXECUTABLE:FILEPATH=/opt/_internal/cpython-3.5.1/bin/python3
8585
-DPYTHON_INCLUDE_DIR:PATH=/opt/_internal/cpython-3.5.1/include/python3.5m

python/paddle/reader/decorator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from threading import Thread
2121
import subprocess
2222

23-
from Queue import Queue
23+
from six.moves import queue
2424
import itertools
2525
import random
2626
import zlib
@@ -190,7 +190,7 @@ def read_worker(r, q):
190190

191191
def data_reader():
192192
r = reader()
193-
q = Queue(maxsize=size)
193+
q = queue(maxsize=size)
194194
t = Thread(
195195
target=read_worker, args=(
196196
r,
@@ -293,8 +293,8 @@ def order_handle_worker(in_queue, out_queue, mapper, out_order):
293293
out_queue.put(end)
294294

295295
def xreader():
296-
in_queue = Queue(buffer_size)
297-
out_queue = Queue(buffer_size)
296+
in_queue = queue(buffer_size)
297+
out_queue = queue(buffer_size)
298298
out_order = [0]
299299
# start a read worker in a thread
300300
target = order_read_worker if order else read_worker

python/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ scipy>=0.19.0
88
Pillow
99
nltk>=3.2.2
1010
graphviz
11+
six

python/setup.py.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def git_commit():
1717
git_commit = subprocess.Popen(cmd, stdout = subprocess.PIPE).communicate()[0].strip()
1818
except:
1919
git_commit = 'Unknown'
20+
git_commit = git_commit.decode()
2021
return str(git_commit)
2122

2223
def _get_version_detail(idx):
@@ -44,6 +45,7 @@ def is_taged():
4445
try:
4546
cmd = ['git', 'describe', '--exact-match', '--tags']
4647
git_tag = subprocess.Popen(cmd, stdout = subprocess.PIPE).communicate()[0].strip()
48+
git_tag = git_tag.decode()
4749
except:
4850
return False
4951

0 commit comments

Comments
 (0)