提交 98a150fc 编写于 作者: J jiangjiajun

modify setup.py

上级 399b2384
......@@ -20,7 +20,7 @@ paddlepaddle >= 1.5.0
## 安装
```
pip install git+https://github.com/PaddlePaddle/X2Paddle.git@develop
pip install x2paddle --index-url=https://pypi.org/simple/
```
## 使用方法
......
import setuptools
import x2paddle
long_description = "X2Paddle is a toolkit for converting trained model to PaddlePaddle from other deep learning frameworks.\n\n"
long_description += "Usage: x2paddle --framework tensorflow --model tf_model.pb --save_dir paddle_model\n"
long_description += "GitHub: https://github.com/PaddlePaddle/X2Paddle\n"
long_description += "Email: dltp-sz@baidu.com"
setuptools.setup(
name="x2paddle",
version="0.4.0",
version=x2paddle.__version__,
author="dltp-sz",
author_email="dltp-sz@baidu.com",
description=
"a toolkit for converting trained model to PaddlePaddle from other deep learning frameworks.",
long_description_content_type="text/markdown",
long_description=long_description,
long_description_content_type="text/plain",
url="https://github.com/PaddlePaddle/x2paddle",
packages=setuptools.find_packages(),
classifiers=[
......
......@@ -15,6 +15,7 @@
from six import text_type as _text_type
import argparse
import sys
import x2paddle
def arg_parser():
......@@ -49,6 +50,12 @@ def arg_parser():
type=_text_type,
default=None,
help="caffe proto file of caffe model")
parser.add_argument("--version",
"-v",
action="store_true",
default=False,
help="get version of x2paddle")
return parser
......@@ -112,12 +119,16 @@ def caffe2paddle(proto, weight, save_dir, caffe_proto):
def main():
if len(sys.argv) < 2:
print("Use \"x2paddle -h\" to print the help information")
print("Use \"x2paddle -h\" to print the help information\n")
return
parser = arg_parser()
args = parser.parse_args()
if args.version:
print("x2paddle-{} with python>=3.5\n".format(x2paddle.__version__))
return
try:
import paddle
v0, v1, v2 = paddle.__version__.split('.')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册