Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleOCR
提交
2e088638
P
PaddleOCR
项目概览
PaddlePaddle
/
PaddleOCR
大约 1 年 前同步成功
通知
1528
Star
32962
Fork
6643
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
108
列表
看板
标记
里程碑
合并请求
7
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleOCR
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
108
Issue
108
列表
看板
标记
里程碑
合并请求
7
合并请求
7
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
2e088638
编写于
12月 04, 2020
作者:
D
Daniel Yang
提交者:
GitHub
12月 04, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1315 from Evezerest/develop
LGTM
上级
4b526fb5
a9a1606f
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
0 addition
and
216 deletion
+0
-216
PPOCRLabel/build-tools/.gitignore
PPOCRLabel/build-tools/.gitignore
+0
-12
PPOCRLabel/build-tools/README.md
PPOCRLabel/build-tools/README.md
+0
-35
PPOCRLabel/build-tools/build-for-macos.sh
PPOCRLabel/build-tools/build-for-macos.sh
+0
-30
PPOCRLabel/build-tools/build-for-pypi.sh
PPOCRLabel/build-tools/build-for-pypi.sh
+0
-17
PPOCRLabel/build-tools/build-ubuntu-binary.sh
PPOCRLabel/build-tools/build-ubuntu-binary.sh
+0
-24
PPOCRLabel/build-tools/build-windows-binary.sh
PPOCRLabel/build-tools/build-windows-binary.sh
+0
-32
PPOCRLabel/build-tools/envsetup.sh
PPOCRLabel/build-tools/envsetup.sh
+0
-53
PPOCRLabel/build-tools/run-in-container.sh
PPOCRLabel/build-tools/run-in-container.sh
+0
-13
未找到文件。
PPOCRLabel/build-tools/.gitignore
已删除
100644 → 0
浏览文件 @
4b526fb5
*.spec
build
dist
pyinstaller
python-2.*
pywin32*
virtual-wine
venv_wine
PyQt4-*
lxml-*
windows_v*
linux_v*
PPOCRLabel/build-tools/README.md
已删除
100644 → 0
浏览文件 @
4b526fb5
### Deploy to PyPI
```
cd [ROOT]
sh build-tools/build-for-pypi.sh
```
### Build for Ubuntu
```
cd build-tools
sh run-in-container.sh
sh envsetup.sh
sh build-ubuntu-binary.sh
```
### Build for Windows
```
cd build-tools
sh run-in-container.sh
sh envsetup.sh
sh build-windows-binary.sh
```
### Build for macOS High Sierra
```
cd build-tools
./build-for-macos.sh
```
Note: If there are some problems, try to
```
sudo rm -rf virtual-wne venv_wine
```
PPOCRLabel/build-tools/build-for-macos.sh
已删除
100644 → 0
浏览文件 @
4b526fb5
#!/bin/sh
brew
install
python@2
pip
install
--upgrade
virtualenv
# clone labelimg source
rm
-rf
/tmp/labelImgSetup
mkdir
/tmp/labelImgSetup
cd
/tmp/labelImgSetup
curl https://codeload.github.com/tzutalin/labelImg/zip/master
--output
labelImg.zip
unzip labelImg.zip
rm
labelImg.zip
# setup python3 space
virtualenv
--system-site-packages
-p
python3 /tmp/labelImgSetup/labelImg-py3
source
/tmp/labelImgSetup/labelImg-py3/bin/activate
cd
labelImg-master
# build labelImg app
pip
install
py2app
pip
install
PyQt5 lxml
make qt5py3
rm
-rf
build dist
python setup.py py2app
-A
mv
"/tmp/labelImgSetup/labelImg-master/dist/labelImg.app"
/Applications
# deactivate python3
deactivate
cd
../
rm
-rf
/tmp/labelImgSetup
echo
'DONE'
PPOCRLabel/build-tools/build-for-pypi.sh
已删除
100644 → 0
浏览文件 @
4b526fb5
#!/bin/sh
# Packaging and Release
docker run
--workdir
=
$(
pwd
)
/
--volume
=
"/home/
$USER
:/home/
$USER
"
tzutalin/py2qt4 /bin/sh
-c
'make qt4py2; make test;sudo python setup.py sdist;sudo python setup.py install'
while
true
;
do
read
-p
"Do you wish to deploy this to PyPI(twine upload dist/* or pip install dist/*)?"
yn
case
$yn
in
[
Yy]
*
)
docker run
-it
--rm
--workdir
=
$(
pwd
)
/
--volume
=
"/home/
$USER
:/home/
$USER
"
tzutalin/py2qt4
;
break
;;
[
Nn]
*
)
exit
;;
*
)
echo
"Please answer yes or no."
;;
esac
done
# python setup.py register
# python setup.py sdist upload
# Net pypi: twine upload dist/*
# Test before upladoing: pip install dist/labelImg.tar.gz
PPOCRLabel/build-tools/build-ubuntu-binary.sh
已删除
100644 → 0
浏览文件 @
4b526fb5
#!/bin/bash
### Ubuntu use pyinstall v3.0
THIS_SCRIPT_PATH
=
`
readlink
-f
$0
`
THIS_SCRIPT_DIR
=
`
dirname
${
THIS_SCRIPT_PATH
}
`
cd
pyinstaller
git checkout v3.2
cd
${
THIS_SCRIPT_DIR
}
rm
-r
build
rm
-r
dist
rm
labelImg.spec
python pyinstaller/pyinstaller.py
--hidden-import
=
xml
\
--hidden-import
=
xml.etree
\
--hidden-import
=
xml.etree.ElementTree
\
--hidden-import
=
lxml.etree
\
-D
-F
-n
labelImg
-c
"../labelImg.py"
-p
../libs
-p
../
FOLDER
=
$(
git describe
--abbrev
=
0
--tags
)
FOLDER
=
"linux_"
$FOLDER
rm
-rf
"
$FOLDER
"
mkdir
"
$FOLDER
"
cp
dist/labelImg
$FOLDER
cp
-rf
../data
$FOLDER
/data
zip
"
$FOLDER
.zip"
-r
$FOLDER
PPOCRLabel/build-tools/build-windows-binary.sh
已删除
100644 → 0
浏览文件 @
4b526fb5
#!/bin/bash
### Window requires pyinstall v2.1
wine msiexec
-i
python-2.7.8.msi
wine pywin32-218.win32-py2.7.exe
wine PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x32.exe
wine lxml-3.7.3.win32-py2.7.exe
THIS_SCRIPT_PATH
=
`
readlink
-f
$0
`
THIS_SCRIPT_DIR
=
`
dirname
${
THIS_SCRIPT_PATH
}
`
cd
pyinstaller
git checkout v2.1
cd
${
THIS_SCRIPT_DIR
}
echo
${
THIS_SCRIPT_DIR
}
#. venv_wine/bin/activate
rm
-r
build
rm
-r
dist
rm
labelImg.spec
wine c:/Python27/python.exe pyinstaller/pyinstaller.py
--hidden-import
=
xml
\
--hidden-import
=
xml.etree
\
--hidden-import
=
xml.etree.ElementTree
\
--hidden-import
=
lxml.etree
\
-D
-F
-n
labelImg
-c
"../labelImg.py"
-p
../libs
-p
../
FOLDER
=
$(
git describe
--abbrev
=
0
--tags
)
FOLDER
=
"windows_"
$FOLDER
rm
-rf
"
$FOLDER
"
mkdir
"
$FOLDER
"
cp
dist/labelImg.exe
$FOLDER
cp
-rf
../data
$FOLDER
/data
zip
"
$FOLDER
.zip"
-r
$FOLDER
PPOCRLabel/build-tools/envsetup.sh
已删除
100644 → 0
浏览文件 @
4b526fb5
#!/bin/sh
THIS_SCRIPT_PATH
=
`
readlink
-f
$0
`
THIS_SCRIPT_DIR
=
`
dirname
${
THIS_SCRIPT_PATH
}
`
#OS Ubuntu 14.04
### Common packages for linux/windows
if
[
!
-e
"pyinstaller"
]
;
then
git clone https://github.com/pyinstaller/pyinstaller
cd
pyinstaller
git checkout v2.1
-b
v2.1
cd
${
THIS_SCRIPT_DIR
}
fi
echo
"Going to clone and download packages for building windows"
#Pacakges
#> pyinstaller (2.1)
#> wine (1.6.2)
#> virtual-wine (0.1)
#> python-2.7.8.msi
#> pywin32-218.win32-py2.7.exe
## tool to install on Ubuntu
#$ sudo apt-get install wine
### Clone a repo to create virtual wine env
if
[
!
-e
"virtual-wine"
]
;
then
git clone https://github.com/htgoebel/virtual-wine.git
fi
apt-get
install
scons
### Create virtual env
rm
-rf
venv_wine
./virtual-wine/vwine-setup venv_wine
#### Active virutal env
.
venv_wine/bin/activate
### Use wine to install packages to virtual env
if
[
!
-e
"python-2.7.8.msi"
]
;
then
wget
"https://www.python.org/ftp/python/2.7.8/python-2.7.8.msi"
fi
if
[
!
-e
"pywin32-218.win32-py2.7.exe"
]
;
then
wget
"http://nchc.dl.sourceforge.net/project/pywin32/pywin32/Build%20218/pywin32-218.win32-py2.7.exe"
fi
if
[
!
-e
"PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x32.exe"
]
;
then
wget
"http://nchc.dl.sourceforge.net/project/pyqt/PyQt4/PyQt-4.11.4/PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x32.exe"
fi
if
[
!
-e
"lxml-3.7.3.win32-py2.7.exe"
]
;
then
wget
"https://pypi.python.org/packages/a3/f6/a28c5cf63873f6c55a3eb7857b736379229b85ba918261d2e88cf886905e/lxml-3.7.3.win32-py2.7.exe#md5=a0f746355876aca4ca5371cb0f1d13ce"
fi
PPOCRLabel/build-tools/run-in-container.sh
已删除
100644 → 0
浏览文件 @
4b526fb5
#!/bin/sh
docker run
-it
\
--user
$(
id
-u
)
\
-e
DISPLAY
=
unix
$DISPLAY
\
--workdir
=
$(
pwd
)
\
--volume
=
"/home/
$USER
:/home/
$USER
"
\
--volume
=
"/etc/group:/etc/group:ro"
\
--volume
=
"/etc/passwd:/etc/passwd:ro"
\
--volume
=
"/etc/shadow:/etc/shadow:ro"
\
--volume
=
"/etc/sudoers.d:/etc/sudoers.d:ro"
\
-v
/tmp/.X11-unix:/tmp/.X11-unix
\
tzutalin/py2qt4
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录