This is an automated email from the ASF dual-hosted git repository. haonan pushed a commit to branch fix_py_client_issue in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 7ea400f36d5e08b7244302ddfa35032f0c24aafa Author: Haonan <[email protected]> AuthorDate: Wed Sep 11 10:36:22 2024 +0800 [PY-Client] fix python client package issue (#13468) --- .github/workflows/multi-language-client.yml | 17 +++++++++++------ iotdb-client/client-py/pom.xml | 2 +- iotdb-client/client-py/release.sh | 1 + 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/multi-language-client.yml b/.github/workflows/multi-language-client.yml index 0ce50ae1bdf..1b48299e398 100644 --- a/.github/workflows/multi-language-client.yml +++ b/.github/workflows/multi-language-client.yml @@ -129,6 +129,9 @@ jobs: runs-on: ${{ (matrix.python == '3.6' && 'ubuntu-20.04') || 'ubuntu-latest' }} steps: + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} - uses: actions/checkout@v4 - name: Cache Maven packages uses: actions/cache@v4 @@ -136,24 +139,26 @@ jobs: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2- + - name: Cache pip packages + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: ${{ runner.os }}-pip- - name: Build IoTDB server distribution zip and python client run: mvn -B clean install -pl distribution,iotdb-client/client-py -am -DskipTests - name: Build IoTDB server docker image run: | docker build . -f docker/src/main/Dockerfile-1c1d -t "iotdb:dev" docker images - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python }} - name: Install IoTDB python client requirements run: pip3 install -r iotdb-client/client-py/requirements_dev.txt - name: Check code style if: ${{ matrix.python == '3.x'}} shell: bash run: black iotdb-client/client-py/ --check --diff - - name: Integration test + - name: Integration test and test make package shell: bash run: | cd iotdb-client/client-py/ && pytest . - - + ./release.sh diff --git a/iotdb-client/client-py/pom.xml b/iotdb-client/client-py/pom.xml index 0d942986ac8..44a2ad7ca9c 100644 --- a/iotdb-client/client-py/pom.xml +++ b/iotdb-client/client-py/pom.xml @@ -151,7 +151,7 @@ <goal>copy-resources</goal> </goals> <!-- here the phase you need --> - <phase>generate-sources</phase> + <phase>process-resources</phase> <configuration> <encoding>utf-8</encoding> <outputDirectory>${basedir}/</outputDirectory> diff --git a/iotdb-client/client-py/release.sh b/iotdb-client/client-py/release.sh index 692047b8b57..60e466eea7e 100755 --- a/iotdb-client/client-py/release.sh +++ b/iotdb-client/client-py/release.sh @@ -25,6 +25,7 @@ python3 --version rm -Rf build rm -Rf dist rm -Rf iotdb_session.egg_info +rm -f pyproject.toml # (Re-)build generated code (cd ../..; mvn clean package -pl iotdb-client/client-py -am)
