From d044a7c01da4df893ec4b55385f67db45e8a58a1 Mon Sep 17 00:00:00 2001 From: German Date: Mon, 16 Oct 2023 11:36:07 +0200 Subject: [PATCH 1/2] Adding step for importing library --- build-wheelhouse/action.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/build-wheelhouse/action.yml b/build-wheelhouse/action.yml index f7985e8e1..2ed7ea5ad 100644 --- a/build-wheelhouse/action.yml +++ b/build-wheelhouse/action.yml @@ -92,6 +92,18 @@ runs: run: | python -m pip install ${{ env.install_target }} + - name: "Verify library is properly installed" + shell: bash + run: | + library_name=${{ inputs.library-name }} + + if python -c "import $library_name"; then + echo "Python module '$library_name' successfully imported." + else + echo "Failed to import Python module '$library_name': Something went wrong." + exit 1 + fi + - name: "Verify if importlib-metadata needs to be installed" shell: bash run: | @@ -112,7 +124,8 @@ runs: run: | python -m pip install importlib-metadata - - name: "Verify library is properly installed and get its version number" + + - name: "Get library version number" shell: bash run: | library_name=${{ inputs.library-name }} From b5b4a3eeab7f3c4c279b005a8618c4002b14560b Mon Sep 17 00:00:00 2001 From: German Date: Mon, 16 Oct 2023 12:13:59 +0200 Subject: [PATCH 2/2] replacing `-` by `.` in library name --- build-wheelhouse/action.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build-wheelhouse/action.yml b/build-wheelhouse/action.yml index 2ed7ea5ad..dfba69adf 100644 --- a/build-wheelhouse/action.yml +++ b/build-wheelhouse/action.yml @@ -97,6 +97,9 @@ runs: run: | library_name=${{ inputs.library-name }} + library_name="${library_name//-/.}" + echo "Modified the library name for importing: '$library_name'" + if python -c "import $library_name"; then echo "Python module '$library_name' successfully imported." else