Skip to content

Commit

Permalink
Migrate minio-py to use latest release 2.2.4
Browse files Browse the repository at this point in the history
Also fix unicode support for PYTHON by adding LANG env.

docker-library/python@dbe3e24
  • Loading branch information
harshavardhana committed Jul 6, 2017
1 parent d22d492 commit 3ac337a
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 405 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM ubuntu:16.04

ENV DEBIAN_FRONTEND noninteractive

ENV LANG C.UTF-8

ENV GOROOT /usr/local/go

ENV GOPATH /usr/local
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ FROM ubuntu:16.04

ENV DEBIAN_FRONTEND noninteractive

ENV LANG C.UTF-8

ENV GOROOT /usr/local/go

ENV GOPATH /usr/local
Expand Down
3 changes: 3 additions & 0 deletions build/py/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ set -e
install() {
apt-get install -yq python3
apt-get install -yq python3-pip
# python3 installation doesn't create /usr/bin/python symlink,
# create this pro-actively.
update-alternatives --install /usr/bin/python python /usr/bin/python3.5 1
}

# Remove python dependencies
Expand Down
11 changes: 10 additions & 1 deletion build/py/minio-py.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,25 @@ set -e

_init() {
MINIO_PY_SDK_PATH="/mint/run/core/minio-py"
MINIO_PY_SDK_VERSION="2.2.2"
MINIO_PY_SDK_VERSION="2.2.4"
}

installDeps() {
pip3 install --user -r ${MINIO_PY_SDK_PATH}/requirements.txt
pip3 install minio==$MINIO_PY_SDK_VERSION
}

installFunctionalTest() {
curl https://raw.githubusercontent.com/minio/minio-py/${MINIO_PY_SDK_VERSION}/tests/functional/tests.py > /usr/bin/minio-py-functional
# This is needed until we make a new minio-py release.
sed -i 's/DATA_DIR/MINT_DATA_DIR/g' /usr/bin/minio-py-functional
chmod +x /usr/bin/minio-py-functional
sync
}

main() {
installDeps
installFunctionalTest
}

_init "$@" && main
Loading

0 comments on commit 3ac337a

Please sign in to comment.