From b0e7706de9170fe1a0559af7cd199fc465c578d8 Mon Sep 17 00:00:00 2001 From: tzutalin Date: Fri, 7 Jul 2017 13:19:18 +0800 Subject: [PATCH] Update build-for-pypi.sh --- README.rst | 6 +++--- build-tools/build-for-pypi.sh | 14 +++++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 7ecd68d2..a5075c8d 100644 --- a/README.rst +++ b/README.rst @@ -89,8 +89,6 @@ Use Docker ~~~~~~~~~~~~~~~~~ .. code:: - docker pull tzutalin/py2qt4 - docker run -it \ --user $(id -u) \ -e DISPLAY=unix$DISPLAY \ @@ -103,7 +101,9 @@ Use Docker -v /tmp/.X11-unix:/tmp/.X11-unix \ tzutalin/py2qt4 -You can pull the image which has all of the installed and required dependencies. `Watch a demo video `__ + make all;./labelImg.py + +You can pull the image which has all of the installed and required dependencies. `Watch a demo video `__ Usage diff --git a/build-tools/build-for-pypi.sh b/build-tools/build-for-pypi.sh index 4f9db895..2d0c1d71 100755 --- a/build-tools/build-for-pypi.sh +++ b/build-tools/build-for-pypi.sh @@ -1,7 +1,15 @@ #!/bin/sh -# Packaging -cd ..;sudo python setup.py sdist;sudo python setup.py install +# Packaging and Release +docker run --workdir=$(pwd)/ --volume="/home/$USER:/home/$USER" tzutalin/py2qt4 /bin/sh -c 'sudo python setup.py sdist;sudo python setup.py install' -# Release +while true; do + read -p "Do you wish to deploy this to PyPI?" 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/*