From ea993d830c89992735704a3c85af851471340552 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 08:14:58 +0200 Subject: [PATCH 01/25] fix: avoid failure when sdist is already pushed Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index def46d2e..efd1346b 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -256,9 +256,9 @@ jobs: - name: publish wheels (dry run) run: | - poetry publish --dry-run --no-interaction -vvv + poetry publish --skip-existing --dry-run --no-interaction -vvv - name: publish wheels (on publishing) [for releases only] if: ${{ startsWith(github.ref, 'refs/tags/') }} run: | - poetry publish --no-interaction -vvv + poetry publish --skip-existing --no-interaction -vvv From bf5578518856b4843eb1535012deefbcec6b8198 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 08:23:29 +0200 Subject: [PATCH 02/25] add failure if python version is not matching Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index efd1346b..9d26ffbd 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -100,6 +100,7 @@ jobs: run: | echo "Building wheel ${CIBW_BUILD}" poetry run python --version + poetry run python --version | grep ${{ matrix.os.macos_version }} -qz poetry install --no-root --only=build cat ./pyproject.toml poetry run python -m cibuildwheel --output-dir wheelhouse @@ -140,6 +141,7 @@ jobs: run: | echo "Building wheel ${CIBW_BUILD}" poetry run python --version + poetry run python --version | grep ${{ matrix.os.macos_version }} -qz poetry install --no-root --only=build cat ./pyproject.toml poetry run python -m cibuildwheel --output-dir wheelhouse @@ -185,6 +187,7 @@ jobs: run: | echo "Building wheel ${CIBW_BUILD}" poetry run python --version + poetry run python --version | grep ${{ matrix.os.macos_version }} -qz poetry install --no-root --only=build cat ./pyproject.toml poetry run python -m cibuildwheel --output-dir ./wheelhouse From e1b34538c46591ffaaafceda9edbfb2fa6eb137e Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 08:32:32 +0200 Subject: [PATCH 03/25] verbose print Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 9d26ffbd..63afcc28 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -98,7 +98,9 @@ jobs: ARCHFLAGS: -arch x86_64 BUILD_THREADS: "4" run: | - echo "Building wheel ${CIBW_BUILD}" + echo "Building wheel ${CIBW_BUILD} ${{ env.CIBW_BUILD }}" + echo "Building cp: ${{ env.python_cp_version }}" + echo "Building platform_id: ${{ matrix.os.platform_id }}" poetry run python --version poetry run python --version | grep ${{ matrix.os.macos_version }} -qz poetry install --no-root --only=build @@ -139,7 +141,9 @@ jobs: ARCHFLAGS: -arch arm64 BUILD_THREADS: "4" run: | - echo "Building wheel ${CIBW_BUILD}" + echo "Building wheel ${CIBW_BUILD} ${{ env.CIBW_BUILD }}" + echo "Building cp: ${{ env.python_cp_version }}" + echo "Building platform_id: ${{ matrix.os.platform_id }}" poetry run python --version poetry run python --version | grep ${{ matrix.os.macos_version }} -qz poetry install --no-root --only=build @@ -185,7 +189,9 @@ jobs: CIBW_BUILD_VERBOSITY: 3 BUILD_THREADS: "8" run: | - echo "Building wheel ${CIBW_BUILD}" + echo "Building wheel ${CIBW_BUILD} ${{ env.CIBW_BUILD }}" + echo "Building cp: ${{ env.python_cp_version }}" + echo "Building platform_id: ${{ matrix.os.platform_id }}" poetry run python --version poetry run python --version | grep ${{ matrix.os.macos_version }} -qz poetry install --no-root --only=build From a0545d55d9be7504a1a82d00fc5b5fc3b38c0350 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 08:37:54 +0200 Subject: [PATCH 04/25] print simple grep Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 63afcc28..e615565c 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -102,7 +102,7 @@ jobs: echo "Building cp: ${{ env.python_cp_version }}" echo "Building platform_id: ${{ matrix.os.platform_id }}" poetry run python --version - poetry run python --version | grep ${{ matrix.os.macos_version }} -qz + poetry run python --version | grep ${{ matrix.os.macos_version }} poetry install --no-root --only=build cat ./pyproject.toml poetry run python -m cibuildwheel --output-dir wheelhouse @@ -145,7 +145,7 @@ jobs: echo "Building cp: ${{ env.python_cp_version }}" echo "Building platform_id: ${{ matrix.os.platform_id }}" poetry run python --version - poetry run python --version | grep ${{ matrix.os.macos_version }} -qz + poetry run python --version | grep ${{ matrix.os.macos_version }} poetry install --no-root --only=build cat ./pyproject.toml poetry run python -m cibuildwheel --output-dir wheelhouse @@ -193,7 +193,7 @@ jobs: echo "Building cp: ${{ env.python_cp_version }}" echo "Building platform_id: ${{ matrix.os.platform_id }}" poetry run python --version - poetry run python --version | grep ${{ matrix.os.macos_version }} -qz + poetry run python --version | grep ${{ matrix.os.macos_version }} poetry install --no-root --only=build cat ./pyproject.toml poetry run python -m cibuildwheel --output-dir ./wheelhouse From b72a01ff15953870065baf78471211d841c1b4e3 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 08:46:24 +0200 Subject: [PATCH 05/25] grep proper variable Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e615565c..2eff8340 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -102,7 +102,7 @@ jobs: echo "Building cp: ${{ env.python_cp_version }}" echo "Building platform_id: ${{ matrix.os.platform_id }}" poetry run python --version - poetry run python --version | grep ${{ matrix.os.macos_version }} + poetry run python --version | grep ${{ matrix.python-version }} poetry install --no-root --only=build cat ./pyproject.toml poetry run python -m cibuildwheel --output-dir wheelhouse @@ -145,7 +145,7 @@ jobs: echo "Building cp: ${{ env.python_cp_version }}" echo "Building platform_id: ${{ matrix.os.platform_id }}" poetry run python --version - poetry run python --version | grep ${{ matrix.os.macos_version }} + poetry run python --version | grep ${{ matrix.python-version }} poetry install --no-root --only=build cat ./pyproject.toml poetry run python -m cibuildwheel --output-dir wheelhouse @@ -193,7 +193,7 @@ jobs: echo "Building cp: ${{ env.python_cp_version }}" echo "Building platform_id: ${{ matrix.os.platform_id }}" poetry run python --version - poetry run python --version | grep ${{ matrix.os.macos_version }} + poetry run python --version | grep ${{ matrix.python-version }} poetry install --no-root --only=build cat ./pyproject.toml poetry run python -m cibuildwheel --output-dir ./wheelhouse From 643faf259e5dd4b114457001b6f00c925dab8296 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 08:51:46 +0200 Subject: [PATCH 06/25] test that the compiled modules are in the wheels Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 2eff8340..f7cc0e57 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -118,6 +118,8 @@ jobs: for file in ./wheelhouse/*.whl; do echo "Inspecting $file" poetry run python -m zipfile --list "$file" + poetry run python -m zipfile --list "$file" | grep .so + poetry run python -m zipfile --list "$file" | grep ${{ env.python_cp_version }} done mkdir -p ./dist cp wheelhouse/*.whl ./dist/ @@ -161,6 +163,8 @@ jobs: for file in ./wheelhouse/*.whl; do echo "Inspecting $file" poetry run python -m zipfile --list "$file" + poetry run python -m zipfile --list "$file" | grep .so + poetry run python -m zipfile --list "$file" | grep ${{ env.python_cp_version }} done mkdir -p ./dist cp wheelhouse/*.whl ./dist/ @@ -201,6 +205,8 @@ jobs: for file in ./wheelhouse/*.whl; do echo "Inspecting $file" poetry run python -m zipfile --list "$file" + poetry run python -m zipfile --list "$file" | grep .so + poetry run python -m zipfile --list "$file" | grep ${{ env.python_cp_version }} done mkdir -p ./dist cp wheelhouse/*.whl ./dist/ From 0f7dee9c5625cc1929bca757df9a22d15e2b87ce Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 09:03:19 +0200 Subject: [PATCH 07/25] test the wheel with docling Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index f7cc0e57..467bf227 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -120,6 +120,14 @@ jobs: poetry run python -m zipfile --list "$file" poetry run python -m zipfile --list "$file" | grep .so poetry run python -m zipfile --list "$file" | grep ${{ env.python_cp_version }} + + echo "Testing usage of the wheel" + python3 -m venv test-venv + source test-venv/bin/activate + pip install docling + pip install $file + docling ./tests/pdf_docs/tests/2305.14962v1.pdf + rm -r test-venv done mkdir -p ./dist cp wheelhouse/*.whl ./dist/ @@ -165,6 +173,14 @@ jobs: poetry run python -m zipfile --list "$file" poetry run python -m zipfile --list "$file" | grep .so poetry run python -m zipfile --list "$file" | grep ${{ env.python_cp_version }} + + echo "Testing usage of the wheel" + python3 -m venv test-venv + source test-venv/bin/activate + pip install docling + pip install $file + docling ./tests/pdf_docs/tests/2305.14962v1.pdf + rm -r test-venv done mkdir -p ./dist cp wheelhouse/*.whl ./dist/ @@ -207,6 +223,18 @@ jobs: poetry run python -m zipfile --list "$file" poetry run python -m zipfile --list "$file" | grep .so poetry run python -m zipfile --list "$file" | grep ${{ env.python_cp_version }} + + echo "Testing usage of the wheel" + if [[ $file == *"x86_64"* ]]; then + python3 -m venv test-venv + source test-venv/bin/activate + pip install docling + pip install $file + docling ./tests/pdf_docs/tests/2305.14962v1.pdf + rm -r test-venv + else + echo "..skipping arm64 because we are on x86" + fi done mkdir -p ./dist cp wheelhouse/*.whl ./dist/ From 2ae51dedb13ee905e220939dcdca8ee9adeccb8b Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 09:53:11 +0200 Subject: [PATCH 08/25] fix grep for python cache_tag Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 467bf227..d424e1af 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -98,8 +98,10 @@ jobs: ARCHFLAGS: -arch x86_64 BUILD_THREADS: "4" run: | + PY_CACHE_TAG=$(poetry run python -c 'import sys;print(sys.implementation.cache_tag)') echo "Building wheel ${CIBW_BUILD} ${{ env.CIBW_BUILD }}" echo "Building cp: ${{ env.python_cp_version }}" + echo "Building cache_tag: ${PY_CACHE_TAG}" echo "Building platform_id: ${{ matrix.os.platform_id }}" poetry run python --version poetry run python --version | grep ${{ matrix.python-version }} @@ -118,8 +120,8 @@ jobs: for file in ./wheelhouse/*.whl; do echo "Inspecting $file" poetry run python -m zipfile --list "$file" - poetry run python -m zipfile --list "$file" | grep .so - poetry run python -m zipfile --list "$file" | grep ${{ env.python_cp_version }} + poetry run python -m zipfile --list "$file" | grep \\.so + poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} echo "Testing usage of the wheel" python3 -m venv test-venv @@ -151,8 +153,10 @@ jobs: ARCHFLAGS: -arch arm64 BUILD_THREADS: "4" run: | + PY_CACHE_TAG=$(poetry run python -c 'import sys;print(sys.implementation.cache_tag)') echo "Building wheel ${CIBW_BUILD} ${{ env.CIBW_BUILD }}" echo "Building cp: ${{ env.python_cp_version }}" + echo "Building cache_tag: ${PY_CACHE_TAG}" echo "Building platform_id: ${{ matrix.os.platform_id }}" poetry run python --version poetry run python --version | grep ${{ matrix.python-version }} @@ -171,8 +175,8 @@ jobs: for file in ./wheelhouse/*.whl; do echo "Inspecting $file" poetry run python -m zipfile --list "$file" - poetry run python -m zipfile --list "$file" | grep .so - poetry run python -m zipfile --list "$file" | grep ${{ env.python_cp_version }} + poetry run python -m zipfile --list "$file" | grep \\.so + poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} echo "Testing usage of the wheel" python3 -m venv test-venv @@ -209,8 +213,9 @@ jobs: CIBW_BUILD_VERBOSITY: 3 BUILD_THREADS: "8" run: | - echo "Building wheel ${CIBW_BUILD} ${{ env.CIBW_BUILD }}" + PY_CACHE_TAG=$(poetry run python -c 'import sys;print(sys.implementation.cache_tag)') echo "Building cp: ${{ env.python_cp_version }}" + echo "Building cache_tag: ${PY_CACHE_TAG}" echo "Building platform_id: ${{ matrix.os.platform_id }}" poetry run python --version poetry run python --version | grep ${{ matrix.python-version }} @@ -221,8 +226,8 @@ jobs: for file in ./wheelhouse/*.whl; do echo "Inspecting $file" poetry run python -m zipfile --list "$file" - poetry run python -m zipfile --list "$file" | grep .so - poetry run python -m zipfile --list "$file" | grep ${{ env.python_cp_version }} + poetry run python -m zipfile --list "$file" | grep \\.so + poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} echo "Testing usage of the wheel" if [[ $file == *"x86_64"* ]]; then From d32732e35cfa26de6ebdfeade1a3ef5baddbc558 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 10:03:00 +0200 Subject: [PATCH 09/25] nicer print while checking Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index d424e1af..847b55f6 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -120,7 +120,9 @@ jobs: for file in ./wheelhouse/*.whl; do echo "Inspecting $file" poetry run python -m zipfile --list "$file" + echo "Checking if .so is contained in the wheel" poetry run python -m zipfile --list "$file" | grep \\.so + echo "Checking if the correct python version is contained in the wheel" poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} echo "Testing usage of the wheel" @@ -175,7 +177,9 @@ jobs: for file in ./wheelhouse/*.whl; do echo "Inspecting $file" poetry run python -m zipfile --list "$file" + echo "Checking if .so is contained in the wheel" poetry run python -m zipfile --list "$file" | grep \\.so + echo "Checking if the correct python version is contained in the wheel" poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} echo "Testing usage of the wheel" @@ -226,7 +230,9 @@ jobs: for file in ./wheelhouse/*.whl; do echo "Inspecting $file" poetry run python -m zipfile --list "$file" + echo "Checking if .so is contained in the wheel" poetry run python -m zipfile --list "$file" | grep \\.so + echo "Checking if the correct python version is contained in the wheel" poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} echo "Testing usage of the wheel" From 2153125d4a098edb3c88334a95eaeb36ccc31703 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 10:03:48 +0200 Subject: [PATCH 10/25] fix env set by setup-python Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 847b55f6..a477d5bd 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -53,6 +53,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + update-environment: false - name: Install Poetry run: python -m pip install poetry==1.8.3 From fc9ee19456e5683fafaa5abfd829cb97e3199825 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 10:52:36 +0200 Subject: [PATCH 11/25] fix poetry init and use set MPS watermark Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index a477d5bd..e2d75c28 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -56,7 +56,9 @@ jobs: update-environment: false - name: Install Poetry - run: python -m pip install poetry==1.8.3 + run: | + python -m pip install poetry==1.8.3 + poetry env use python3 - name: Set up custom PATH and set py version to cpXYZ [windows] if: ${{matrix.os.platform_id == 'win_amd64'}} @@ -98,6 +100,7 @@ jobs: CIBW_ENVIRONMENT: "MACOSX_DEPLOYMENT_TARGET=${{ matrix.os.macos_version }}.0" ARCHFLAGS: -arch x86_64 BUILD_THREADS: "4" + PYTORCH_MPS_HIGH_WATERMARK_RATIO: "0.0" run: | PY_CACHE_TAG=$(poetry run python -c 'import sys;print(sys.implementation.cache_tag)') echo "Building wheel ${CIBW_BUILD} ${{ env.CIBW_BUILD }}" @@ -155,6 +158,7 @@ jobs: CIBW_ENVIRONMENT: "MACOSX_DEPLOYMENT_TARGET=${{ matrix.os.macos_version }}.0" ARCHFLAGS: -arch arm64 BUILD_THREADS: "4" + PYTORCH_MPS_HIGH_WATERMARK_RATIO: "0.0" run: | PY_CACHE_TAG=$(poetry run python -c 'import sys;print(sys.implementation.cache_tag)') echo "Building wheel ${CIBW_BUILD} ${{ env.CIBW_BUILD }}" From f1ab65248645662a0390cc6e372eb95a77f9849a Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 12:40:31 +0200 Subject: [PATCH 12/25] install poetry with pipx Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e2d75c28..60cfd2e1 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -57,7 +57,7 @@ jobs: - name: Install Poetry run: | - python -m pip install poetry==1.8.3 + pipx install poetry==1.8.3 poetry env use python3 - name: Set up custom PATH and set py version to cpXYZ [windows] From e4e4e7d2b7dba898c27c969350791a4592596213 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 12:42:34 +0200 Subject: [PATCH 13/25] verbose print python version Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 60cfd2e1..30b34767 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -57,6 +57,10 @@ jobs: - name: Install Poetry run: | + which python + python --version + which python3 + python3 --version pipx install poetry==1.8.3 poetry env use python3 From 4238961c009fb7d08de225fc625cf647faa80192 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 13:55:49 +0200 Subject: [PATCH 14/25] use explicit python-path output Signed-off-by: Michele Dolfi --- .github/actions/setup-poetry/action.yml | 7 +++++-- .github/workflows/wheels.yml | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-poetry/action.yml b/.github/actions/setup-poetry/action.yml index e374f039..77a1324e 100644 --- a/.github/actions/setup-poetry/action.yml +++ b/.github/actions/setup-poetry/action.yml @@ -10,13 +10,16 @@ runs: - name: Install poetry run: pipx install poetry==1.8.3 shell: bash - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 + id: py with: python-version: ${{ inputs.python-version }} update-environment: false cache: 'poetry' - name: Setup poetry env with correct python - run: poetry env use python3 + run: | + poetry env use ${{ steps.py.outputs.python-path }} + poetry run python --version shell: bash - name: Install only dependencies and not the package itself run: poetry install --all-extras --no-root diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 30b34767..170cb162 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -51,6 +51,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 + id: py with: python-version: ${{ matrix.python-version }} update-environment: false @@ -61,8 +62,10 @@ jobs: python --version which python3 python3 --version + echo "pythonpath: ${{ steps.py.outputs.python-path }}" + ${{ steps.py.outputs.python-path }} --version pipx install poetry==1.8.3 - poetry env use python3 + poetry env use ${{ steps.py.outputs.python-path }} - name: Set up custom PATH and set py version to cpXYZ [windows] if: ${{matrix.os.platform_id == 'win_amd64'}} From 1b205ddd9a0d7887b0b90f0dc0be1645a49d88d6 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 15:11:32 +0200 Subject: [PATCH 15/25] use findpython3 and promote venv Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 2 ++ CMakeLists.txt | 2 +- build.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 170cb162..764e47de 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -66,6 +66,8 @@ jobs: ${{ steps.py.outputs.python-path }} --version pipx install poetry==1.8.3 poetry env use ${{ steps.py.outputs.python-path }} + echo "Activate poetry virtualenv" + poetry shell - name: Set up custom PATH and set py version to cpXYZ [windows] if: ${{matrix.os.platform_id == 'win_amd64'}} diff --git a/CMakeLists.txt b/CMakeLists.txt index d9da5908..bbc8ccac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -147,7 +147,7 @@ target_link_libraries(parse ${LIB_LINK}) # *************************** # https://pybind11.readthedocs.io/en/stable/compiling.html -find_package (Python COMPONENTS Interpreter Development) +find_package (Python3 COMPONENTS Interpreter Development) find_package(pybind11 CONFIG REQUIRED) pybind11_add_module(docling_parse "${TOPLEVEL_PREFIX_PATH}/app/pybind_parse.cpp") diff --git a/build.py b/build.py index 9bf71558..40b343fb 100644 --- a/build.py +++ b/build.py @@ -46,6 +46,7 @@ def build_local(num_threads: int): "-B", f"{BUILD_DIR}", f"-DPython_ROOT_DIR={sys.exec_prefix}", f"-DPython3_ROOT_DIR={sys.exec_prefix}", + f"-DPython3_FIND_VIRTUALENV=FIRST", ] config_cmd.extend(get_pybind11_cmake_args()) success = run(config_cmd, cwd=ROOT_DIR) From eba76d3f62802f4b31aabdc0b806fa36863df021 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 20:31:36 +0200 Subject: [PATCH 16/25] let pybind11 find Python and use PYTHON_EXECUTABLE Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 2 -- CMakeLists.txt | 4 ++-- build.py | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 764e47de..170cb162 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -66,8 +66,6 @@ jobs: ${{ steps.py.outputs.python-path }} --version pipx install poetry==1.8.3 poetry env use ${{ steps.py.outputs.python-path }} - echo "Activate poetry virtualenv" - poetry shell - name: Set up custom PATH and set py version to cpXYZ [windows] if: ${{matrix.os.platform_id == 'win_amd64'}} diff --git a/CMakeLists.txt b/CMakeLists.txt index bbc8ccac..86924747 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.12..3.26) project(docling_parse VERSION 1.0.0 LANGUAGES CXX C) #set(CMAKE_VERBOSE_MAKEFILE off) @@ -147,7 +147,7 @@ target_link_libraries(parse ${LIB_LINK}) # *************************** # https://pybind11.readthedocs.io/en/stable/compiling.html -find_package (Python3 COMPONENTS Interpreter Development) +# https://pybind11.readthedocs.io/en/stable/compiling.html#configuration-variables find_package(pybind11 CONFIG REQUIRED) pybind11_add_module(docling_parse "${TOPLEVEL_PREFIX_PATH}/app/pybind_parse.cpp") diff --git a/build.py b/build.py index 40b343fb..09fd276a 100644 --- a/build.py +++ b/build.py @@ -44,9 +44,7 @@ def build_local(num_threads: int): config_cmd = [ "cmake", "-B", f"{BUILD_DIR}", - f"-DPython_ROOT_DIR={sys.exec_prefix}", - f"-DPython3_ROOT_DIR={sys.exec_prefix}", - f"-DPython3_FIND_VIRTUALENV=FIRST", + f"-DPYTHON_EXECUTABLE={sys.executable}", ] config_cmd.extend(get_pybind11_cmake_args()) success = run(config_cmd, cwd=ROOT_DIR) From 53be2888db4701b4b1422c4f1ed8c77e70130b5b Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 20:34:46 +0200 Subject: [PATCH 17/25] add useful print Signed-off-by: Michele Dolfi --- build.py | 1 + 1 file changed, 1 insertion(+) diff --git a/build.py b/build.py index 09fd276a..0f943ce2 100644 --- a/build.py +++ b/build.py @@ -41,6 +41,7 @@ def run(cmd: List[str], cwd: str="./"): def build_local(num_threads: int): print("python prefix: ", sys.exec_prefix) + print("python executable: ", sys.executable) config_cmd = [ "cmake", "-B", f"{BUILD_DIR}", From d60f085a93221f5c381a501a55fc38d948143f86 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 21:19:41 +0200 Subject: [PATCH 18/25] remove python3.9 from CI Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 170cb162..fc2dbeca 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -14,7 +14,7 @@ jobs: # list of github vm: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.10", "3.11", "3.12"] os: - name: "ubuntu-latest" From f85d53e9ae294ee853ca44bd95671d3afe98a1f1 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 21:43:48 +0200 Subject: [PATCH 19/25] check wheels Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index fc2dbeca..ed9d74c2 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -136,6 +136,8 @@ jobs: echo "Checking if the correct python version is contained in the wheel" poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} + poetry run python .github/scripts/check_wheel.py $file + echo "Testing usage of the wheel" python3 -m venv test-venv source test-venv/bin/activate @@ -194,6 +196,8 @@ jobs: echo "Checking if the correct python version is contained in the wheel" poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} + poetry run python .github/scripts/check_wheel.py $file + echo "Testing usage of the wheel" python3 -m venv test-venv source test-venv/bin/activate @@ -247,6 +251,8 @@ jobs: echo "Checking if the correct python version is contained in the wheel" poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} + poetry run python .github/scripts/check_wheel.py $file + echo "Testing usage of the wheel" if [[ $file == *"x86_64"* ]]; then python3 -m venv test-venv From f67c882c494bd606c8f163909008a7295ba1df14 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 21:45:15 +0200 Subject: [PATCH 20/25] add check_wheel.py script Signed-off-by: Michele Dolfi --- .github/scripts/check_wheel.py | 83 ++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100755 .github/scripts/check_wheel.py diff --git a/.github/scripts/check_wheel.py b/.github/scripts/check_wheel.py new file mode 100755 index 00000000..bd40752c --- /dev/null +++ b/.github/scripts/check_wheel.py @@ -0,0 +1,83 @@ +#!/usr/bin/env python3 + +# See https://github.com/pypa/pip/issues/10793#issuecomment-1017029048 +import argparse +from pathlib import Path +import sys +from packaging.utils import parse_wheel_filename +import platform + + +def diagnose_unsupported(p: Path) -> str: + p = Path(p) + if not p.exists(): + return f"File '{p}' does not exist" + if not p.is_file(): + return f"'{p}' is not a file" + if p.suffix != ".whl": + return f"'{p}' has incorrect suffix; the suffix must be .whl" + + # The wheel filename must parse: + _, _, _, tags = parse_wheel_filename(p.name) + + tag = None + for t in tags: + tag = t + + # Is a debug wheel being loaded in a non-debug interpreter? + if tag.abi.endswith("d"): + if not sys.flags.debug: + return f"The ABI of the wheel is {tag.abi}, which is a debug wheel. However, the python interpeter does not have the debug flags set." + # Is a cpython wheel being loaded by a non-cpython interpreter? + if tag.abi.startswith("cp"): + if sys.implementation.name != "cpython": + return f"The ABI of the wheel '{p}' requires cpython, but the system implementation is {sys.implementation.name}" + + # If the interpreter is version intolerant, what interpreter should it be using? + idx = tag.interpreter.find("3") + if idx >= 0 and idx < len(tag.interpreter) - 1: + supported_minor = int(tag.interpreter[idx + 1]) + if sys.version_info.minor != supported_minor: + return f"The python minor version is {sys.version_info.minor}, but the wheel only supports minor version {supported_minor}" + + # There should be no restriction on the platform: + if tag.platform == "any": + return "" + pieces = tag.platform.split("_") + if len(pieces) != 4: + print("Unable to parse the platform tag") + + wheel_os_name = pieces[0] + wheel_os_version_major = pieces[1] + wheel_os_version_minor = pieces[2] + cpu_architecture = pieces[3] + if wheel_os_name == "macosx": + if sys.platform != "darwin": + return f"The wheel was build for macosx, but the current platform is {sys.platform}" + + if cpu_architecture != platform.machine(): + return f"The CPU architecture supported by the wheel is {cpu_architecture}, but the platform has architecture {platform.machine()}" + + os_major, os_minor, os_patch = platform.mac_ver()[0].split(".") + if int(os_major) < int(wheel_os_version_major): + return f"The operating system major version is {os_major}, but the wheel requires at least OS major version {wheel_os_version_major}" + if int(os_major) == int(wheel_os_version_major): + if int(os_minor) < int(wheel_os_version_minor): + return f"The operating system minor version is {os_minor}, but the wheel requires at least OS major version {wheel_os_version_minor}" + + return "" + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + description="Diagnoses why a wheel is unsupported on a particular platform." + ) + parser.add_argument("wheelfile", type=Path, help="The name of the wheel file.") + args = parser.parse_args() + error_msg = diagnose_unsupported(args.wheelfile) + if len(error_msg) > 0: + print( + f"ERROR: {args.wheelfile} is not supported on this platform. Reason: {error_msg}" + ) + else: + print(f"{args.wheelfile} should be supported on your platform!") From 01597fe464ac153057d81957b9fbc25ecc5a815c Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 21:54:34 +0200 Subject: [PATCH 21/25] fix check wheels Signed-off-by: Michele Dolfi --- .github/scripts/check_wheel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/check_wheel.py b/.github/scripts/check_wheel.py index bd40752c..261fdae7 100755 --- a/.github/scripts/check_wheel.py +++ b/.github/scripts/check_wheel.py @@ -36,7 +36,7 @@ def diagnose_unsupported(p: Path) -> str: # If the interpreter is version intolerant, what interpreter should it be using? idx = tag.interpreter.find("3") if idx >= 0 and idx < len(tag.interpreter) - 1: - supported_minor = int(tag.interpreter[idx + 1]) + supported_minor = int(tag.interpreter[idx + 1:idx + 2]) if sys.version_info.minor != supported_minor: return f"The python minor version is {sys.version_info.minor}, but the wheel only supports minor version {supported_minor}" From 32a9cb101bfa5d30baeaa43fd225b5ec394006ad Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Tue, 1 Oct 2024 21:58:24 +0200 Subject: [PATCH 22/25] fix creation of venv Signed-off-by: Michele Dolfi --- .github/scripts/check_wheel.py | 83 ---------------------------------- .github/workflows/wheels.yml | 12 ++--- 2 files changed, 3 insertions(+), 92 deletions(-) delete mode 100755 .github/scripts/check_wheel.py diff --git a/.github/scripts/check_wheel.py b/.github/scripts/check_wheel.py deleted file mode 100755 index 261fdae7..00000000 --- a/.github/scripts/check_wheel.py +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env python3 - -# See https://github.com/pypa/pip/issues/10793#issuecomment-1017029048 -import argparse -from pathlib import Path -import sys -from packaging.utils import parse_wheel_filename -import platform - - -def diagnose_unsupported(p: Path) -> str: - p = Path(p) - if not p.exists(): - return f"File '{p}' does not exist" - if not p.is_file(): - return f"'{p}' is not a file" - if p.suffix != ".whl": - return f"'{p}' has incorrect suffix; the suffix must be .whl" - - # The wheel filename must parse: - _, _, _, tags = parse_wheel_filename(p.name) - - tag = None - for t in tags: - tag = t - - # Is a debug wheel being loaded in a non-debug interpreter? - if tag.abi.endswith("d"): - if not sys.flags.debug: - return f"The ABI of the wheel is {tag.abi}, which is a debug wheel. However, the python interpeter does not have the debug flags set." - # Is a cpython wheel being loaded by a non-cpython interpreter? - if tag.abi.startswith("cp"): - if sys.implementation.name != "cpython": - return f"The ABI of the wheel '{p}' requires cpython, but the system implementation is {sys.implementation.name}" - - # If the interpreter is version intolerant, what interpreter should it be using? - idx = tag.interpreter.find("3") - if idx >= 0 and idx < len(tag.interpreter) - 1: - supported_minor = int(tag.interpreter[idx + 1:idx + 2]) - if sys.version_info.minor != supported_minor: - return f"The python minor version is {sys.version_info.minor}, but the wheel only supports minor version {supported_minor}" - - # There should be no restriction on the platform: - if tag.platform == "any": - return "" - pieces = tag.platform.split("_") - if len(pieces) != 4: - print("Unable to parse the platform tag") - - wheel_os_name = pieces[0] - wheel_os_version_major = pieces[1] - wheel_os_version_minor = pieces[2] - cpu_architecture = pieces[3] - if wheel_os_name == "macosx": - if sys.platform != "darwin": - return f"The wheel was build for macosx, but the current platform is {sys.platform}" - - if cpu_architecture != platform.machine(): - return f"The CPU architecture supported by the wheel is {cpu_architecture}, but the platform has architecture {platform.machine()}" - - os_major, os_minor, os_patch = platform.mac_ver()[0].split(".") - if int(os_major) < int(wheel_os_version_major): - return f"The operating system major version is {os_major}, but the wheel requires at least OS major version {wheel_os_version_major}" - if int(os_major) == int(wheel_os_version_major): - if int(os_minor) < int(wheel_os_version_minor): - return f"The operating system minor version is {os_minor}, but the wheel requires at least OS major version {wheel_os_version_minor}" - - return "" - - -if __name__ == "__main__": - parser = argparse.ArgumentParser( - description="Diagnoses why a wheel is unsupported on a particular platform." - ) - parser.add_argument("wheelfile", type=Path, help="The name of the wheel file.") - args = parser.parse_args() - error_msg = diagnose_unsupported(args.wheelfile) - if len(error_msg) > 0: - print( - f"ERROR: {args.wheelfile} is not supported on this platform. Reason: {error_msg}" - ) - else: - print(f"{args.wheelfile} should be supported on your platform!") diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index ed9d74c2..0778c769 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -136,10 +136,8 @@ jobs: echo "Checking if the correct python version is contained in the wheel" poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} - poetry run python .github/scripts/check_wheel.py $file - echo "Testing usage of the wheel" - python3 -m venv test-venv + poetry run python -m venv test-venv source test-venv/bin/activate pip install docling pip install $file @@ -196,10 +194,8 @@ jobs: echo "Checking if the correct python version is contained in the wheel" poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} - poetry run python .github/scripts/check_wheel.py $file - echo "Testing usage of the wheel" - python3 -m venv test-venv + poetry run python -m venv test-venv source test-venv/bin/activate pip install docling pip install $file @@ -251,11 +247,9 @@ jobs: echo "Checking if the correct python version is contained in the wheel" poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} - poetry run python .github/scripts/check_wheel.py $file - echo "Testing usage of the wheel" if [[ $file == *"x86_64"* ]]; then - python3 -m venv test-venv + poetry run python -m venv test-venv source test-venv/bin/activate pip install docling pip install $file From 475f34a88176b66e23547b68e9a58767dd7a4c65 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Wed, 2 Oct 2024 06:48:22 +0200 Subject: [PATCH 23/25] fix test with proper arch Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 0778c769..ba2b38d5 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -137,12 +137,16 @@ jobs: poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} echo "Testing usage of the wheel" - poetry run python -m venv test-venv - source test-venv/bin/activate - pip install docling - pip install $file - docling ./tests/pdf_docs/tests/2305.14962v1.pdf - rm -r test-venv + if [[ $file == *"x86_64"* ]]; then + poetry run python -m venv test-venv + source test-venv/bin/activate + pip install docling + pip install $file + docling ./tests/pdf_docs/tests/2305.14962v1.pdf + rm -r test-venv + else + echo "..skipping arm64 because we are on x86" + fi done mkdir -p ./dist cp wheelhouse/*.whl ./dist/ @@ -166,6 +170,7 @@ jobs: ARCHFLAGS: -arch arm64 BUILD_THREADS: "4" PYTORCH_MPS_HIGH_WATERMARK_RATIO: "0.0" + CUDA_VISIBLE_DEVICES: "cpu" run: | PY_CACHE_TAG=$(poetry run python -c 'import sys;print(sys.implementation.cache_tag)') echo "Building wheel ${CIBW_BUILD} ${{ env.CIBW_BUILD }}" @@ -195,12 +200,16 @@ jobs: poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} echo "Testing usage of the wheel" - poetry run python -m venv test-venv - source test-venv/bin/activate - pip install docling - pip install $file - docling ./tests/pdf_docs/tests/2305.14962v1.pdf - rm -r test-venv + if [[ $file == *"arm64"* ]]; then + poetry run python -m venv test-venv + source test-venv/bin/activate + pip install docling + pip install $file + docling ./tests/pdf_docs/tests/2305.14962v1.pdf + rm -r test-venv + else + echo "..skipping x86 because we are on arm64" + fi done mkdir -p ./dist cp wheelhouse/*.whl ./dist/ From cacbf278b94b3bb6e4a6ed1f540cea7b73ef6677 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Wed, 2 Oct 2024 07:37:27 +0200 Subject: [PATCH 24/25] check host arch Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index ba2b38d5..7a3c1b16 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -137,7 +137,7 @@ jobs: poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} echo "Testing usage of the wheel" - if [[ $file == *"x86_64"* ]]; then + if [[ "${{ matrix.os.name }}" == "macos-13" ]]; then poetry run python -m venv test-venv source test-venv/bin/activate pip install docling @@ -145,7 +145,7 @@ jobs: docling ./tests/pdf_docs/tests/2305.14962v1.pdf rm -r test-venv else - echo "..skipping arm64 because we are on x86" + echo "..skipping x86_64 on macos-14 because the host arch is arm64" fi done mkdir -p ./dist @@ -200,7 +200,7 @@ jobs: poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} echo "Testing usage of the wheel" - if [[ $file == *"arm64"* ]]; then + if [[ "${{ matrix.os.name }}" == "macos-14" ]]; then poetry run python -m venv test-venv source test-venv/bin/activate pip install docling @@ -208,7 +208,7 @@ jobs: docling ./tests/pdf_docs/tests/2305.14962v1.pdf rm -r test-venv else - echo "..skipping x86 because we are on arm64" + echo "..skipping arm64 on macos-13 because the host arch is x86_64" fi done mkdir -p ./dist From 994018e5c3510ebf55bb49835d2e581ec590db9c Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Wed, 2 Oct 2024 08:55:56 +0200 Subject: [PATCH 25/25] remove integration test Signed-off-by: Michele Dolfi --- .github/workflows/wheels.yml | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 7a3c1b16..3a90d738 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -135,18 +135,6 @@ jobs: poetry run python -m zipfile --list "$file" | grep \\.so echo "Checking if the correct python version is contained in the wheel" poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} - - echo "Testing usage of the wheel" - if [[ "${{ matrix.os.name }}" == "macos-13" ]]; then - poetry run python -m venv test-venv - source test-venv/bin/activate - pip install docling - pip install $file - docling ./tests/pdf_docs/tests/2305.14962v1.pdf - rm -r test-venv - else - echo "..skipping x86_64 on macos-14 because the host arch is arm64" - fi done mkdir -p ./dist cp wheelhouse/*.whl ./dist/ @@ -198,18 +186,6 @@ jobs: poetry run python -m zipfile --list "$file" | grep \\.so echo "Checking if the correct python version is contained in the wheel" poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} - - echo "Testing usage of the wheel" - if [[ "${{ matrix.os.name }}" == "macos-14" ]]; then - poetry run python -m venv test-venv - source test-venv/bin/activate - pip install docling - pip install $file - docling ./tests/pdf_docs/tests/2305.14962v1.pdf - rm -r test-venv - else - echo "..skipping arm64 on macos-13 because the host arch is x86_64" - fi done mkdir -p ./dist cp wheelhouse/*.whl ./dist/ @@ -255,18 +231,6 @@ jobs: poetry run python -m zipfile --list "$file" | grep \\.so echo "Checking if the correct python version is contained in the wheel" poetry run python -m zipfile --list "$file" | grep ${PY_CACHE_TAG} - - echo "Testing usage of the wheel" - if [[ $file == *"x86_64"* ]]; then - poetry run python -m venv test-venv - source test-venv/bin/activate - pip install docling - pip install $file - docling ./tests/pdf_docs/tests/2305.14962v1.pdf - rm -r test-venv - else - echo "..skipping arm64 because we are on x86" - fi done mkdir -p ./dist cp wheelhouse/*.whl ./dist/