diff --git a/getting-started/spark/notebooks/Dockerfile b/getting-started/spark/notebooks/Dockerfile index 4bd3f3122d..1e0434896f 100644 --- a/getting-started/spark/notebooks/Dockerfile +++ b/getting-started/spark/notebooks/Dockerfile @@ -20,10 +20,9 @@ FROM jupyter/all-spark-notebook:spark-3.5.0 COPY --chown=jovyan regtests/client /home/jovyan/client -WORKDIR /home/jovyan/ RUN pip install poetry==1.5.0 && \ cd client/python && \ python3 -m poetry install && \ pip install -e . -WORKDIR /home/jovyan/ \ No newline at end of file +WORKDIR /home/jovyan/ diff --git a/polaris b/polaris index 9af0dfb5d0..22b8d4760c 100755 --- a/polaris +++ b/polaris @@ -23,7 +23,7 @@ if [ ! -d ${SCRIPT_DIR}/polaris-venv ]; then echo "Performing first-time setup for the Python client..." python3 -m venv ${SCRIPT_DIR}/polaris-venv . ${SCRIPT_DIR}/polaris-venv/bin/activate - pip install poetry==1.5.0 + pip install -r regtests/requirements.txt cp ${SCRIPT_DIR}/regtests/client/python/pyproject.toml ${SCRIPT_DIR} pushd $SCRIPT_DIR && poetry install ; popd diff --git a/regtests/Dockerfile b/regtests/Dockerfile index 18f4d9bff7..497b66c013 100644 --- a/regtests/Dockerfile +++ b/regtests/Dockerfile @@ -40,10 +40,11 @@ COPY ./setup.sh /home/spark/regtests/setup.sh COPY ./pyspark-setup.sh /home/spark/regtests/pyspark-setup.sh COPY ./client/python /home/spark/regtests/client/python COPY ./polaris-reg-test /home/spark/polaris +COPY ./requirements.txt /tmp/ RUN python3 -m venv /home/spark/polaris-venv && \ . /home/spark/polaris-venv/bin/activate && \ - pip install poetry==1.5.0 && \ + pip install -r /tmp/requirements.txt && \ deactivate \ RUN ./setup.sh diff --git a/regtests/client/python/pyproject.toml b/regtests/client/python/pyproject.toml index 2379b209f5..4bb0811420 100644 --- a/regtests/client/python/pyproject.toml +++ b/regtests/client/python/pyproject.toml @@ -27,6 +27,7 @@ readme = "README.md" repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" keywords = ["OpenAPI", "OpenAPI-Generator", "Polaris Management Service"] include = ["polaris.management/py.typed"] +package-mode = true [tool.poetry.dependencies] python = "^3.8" diff --git a/regtests/polaris-reg-test b/regtests/polaris-reg-test index 659cd828d7..e8d66822ee 100755 --- a/regtests/polaris-reg-test +++ b/regtests/polaris-reg-test @@ -37,7 +37,7 @@ if [ ! -d ${SCRIPT_DIR}/polaris-venv ]; then echo "Performing first-time setup for the Python client..." python3 -m venv ${SCRIPT_DIR}/polaris-venv . ${SCRIPT_DIR}/polaris-venv/bin/activate - pip install poetry==1.5.0 + pip install -f requirements.txt cp ${SCRIPT_DIR}/regtests/client/python/pyproject.toml ${SCRIPT_DIR} @@ -61,4 +61,4 @@ if [ $status -ne 0 ]; then exit 1 fi -exit 0 \ No newline at end of file +exit 0 diff --git a/regtests/pyspark-setup.sh b/regtests/pyspark-setup.sh index f94398e956..7f7189a6dd 100755 --- a/regtests/pyspark-setup.sh +++ b/regtests/pyspark-setup.sh @@ -24,8 +24,8 @@ fi . ~/polaris-venv/bin/activate -pip install poetry==1.5.0 +pip install -r requirements.txt cd client/python python3 -m poetry install -deactivate \ No newline at end of file +deactivate diff --git a/regtests/requirements.txt b/regtests/requirements.txt new file mode 100644 index 0000000000..1beb63bca0 --- /dev/null +++ b/regtests/requirements.txt @@ -0,0 +1,20 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +poetry==1.8.5