Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
21be601b
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
21be601b
编写于
5月 25, 2017
作者:
Q
qingqing01
提交者:
GitHub
5月 25, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2268 from reyoung/feature/fix_bug_in_run_python_tests
Fix bug in run_python_tests.sh
上级
d96c35ee
ec6068b1
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
23 addition
and
6 deletion
+23
-6
cmake/util.cmake
cmake/util.cmake
+3
-2
paddle/scripts/run_python_tests.sh
paddle/scripts/run_python_tests.sh
+11
-2
python/CMakeLists.txt
python/CMakeLists.txt
+3
-1
python/paddle/v2/plot/tests/CMakeLists.txt
python/paddle/v2/plot/tests/CMakeLists.txt
+5
-1
python/setup.py.in
python/setup.py.in
+1
-0
未找到文件。
cmake/util.cmake
浏览文件 @
21be601b
...
...
@@ -150,7 +150,8 @@ endfunction()
# which takes care of making correct running environment
function
(
add_python_test TEST_NAME
)
add_test
(
NAME
${
TEST_NAME
}
COMMAND bash
${
PROJ_ROOT
}
/paddle/scripts/run_python_tests.sh
COMMAND env PADDLE_PACKAGE_DIR=
${
PADDLE_PYTHON_PACKAGE_DIR
}
bash
${
PROJ_ROOT
}
/paddle/scripts/run_python_tests.sh
${
USE_VIRTUALENV_FOR_TEST
}
${
PYTHON_EXECUTABLE
}
${
ARGN
}
WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
)
endfunction
()
paddle/scripts/run_python_tests.sh
浏览文件 @
21be601b
...
...
@@ -24,12 +24,21 @@ PYTHON=$1; shift
if
[
$USE_VIRTUALENV_FOR_TEST
-ne
0
]
;
then
rm
-rf
.test_env
virtualenv .test_env
unset
PYTHONHOME
unset
PYTHONPATH
source
.test_env/bin/activate
PYTHON
=
python
fi
export
PYTHONPATH
=
$SCRIPTPATH
/../../python/
$PYTHON
-m
pip
install
$SCRIPTPATH
/../dist/
*
.whl requests matplotlib opencv-python
ipython
==
5.3 rarfile
$PYTHON
-m
pip
install
$SCRIPTPATH
/../dist/
*
.whl
if
[
"X
${
PADDLE_PACKAGE_DIR
}
"
!=
"X"
]
;
then
$PYTHON
-m
pip
install
${
PADDLE_PACKAGE_DIR
}
/
*
.whl
else
export
PYTHONPATH
=
$SCRIPTPATH
/../../python/
fi
$PYTHON
-m
pip
install
ipython
==
5.3
for
fn
in
"
$@
"
do
...
...
python/CMakeLists.txt
浏览文件 @
21be601b
...
...
@@ -23,7 +23,9 @@ add_custom_command(OUTPUT ${OUTPUT_DIR}/.timestamp
add_custom_target
(
paddle_python ALL DEPENDS
${
OUTPUT_DIR
}
/.timestamp
)
set
(
PADDLE_PYTHON_PACKAGE_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/dist/
)
add_subdirectory
(
paddle/trainer_config_helpers/tests
)
if
(
WITH_SWIG_PY
)
# enable v2 API unittest only when paddle swig api is compiled
add_subdirectory
(
paddle/v2/tests
)
...
...
@@ -31,6 +33,6 @@ if (WITH_SWIG_PY)
add_subdirectory
(
paddle/v2/plot/tests
)
endif
()
install
(
DIRECTORY
${
CMAKE_CURRENT_BINARY_DIR
}
/dist/
install
(
DIRECTORY
${
PADDLE_PYTHON_PACKAGE_DIR
}
DESTINATION opt/paddle/share/wheels
)
python/paddle/v2/plot/tests/CMakeLists.txt
浏览文件 @
21be601b
add_python_test
(
test_ploter test_ploter.py
)
if
(
NOT APPLE
)
# The Mac OS X backend will not be able to function correctly if Python is
# not installed as a framework.
add_python_test
(
test_ploter test_ploter.py
)
endif
()
python/setup.py.in
浏览文件 @
21be601b
...
...
@@ -19,6 +19,7 @@ setup(name='paddle',
"numpy",
"protobuf==${PROTOBUF_VERSION}",
"matplotlib",
"opencv-python",
"rarfile"
],
packages=packages,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录