update build macOS
This commit is contained in:
parent
a7fc85270f
commit
1a77b788d1
30
build-tools/build-for-macos.sh
Normal file
30
build-tools/build-for-macos.sh
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
brew install python@2
|
||||||
|
pip install --upgrade virtualenv
|
||||||
|
|
||||||
|
# clonde 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'
|
||||||
Loading…
x
Reference in New Issue
Block a user