@@ -101,7 +101,7 @@ jobs:
101
101
run : sudo apt update && sudo apt install glibc-tools libssh-dev
102
102
- name : Switch 🐍 to v${{ inputs.python-version }}
103
103
id : python-install
104
- uses : actions/setup-python@v5.3.0
104
+ uses : actions/setup-python@v5
105
105
with :
106
106
python-version : ${{ inputs.python-version }}
107
107
@@ -194,6 +194,15 @@ jobs:
194
194
path : dist/
195
195
merge-multiple : true
196
196
197
+ - name : Debug - List downloaded dist files
198
+ run : |
199
+ echo "Contents of dist/ directory:"
200
+ ls -la dist/ || echo "No dist directory found"
201
+ echo -e "\nLooking for wheel files:"
202
+ find dist/ -name '*.whl' -ls || echo "No wheel files found"
203
+ echo -e "\nLooking for source distributions:"
204
+ find dist/ -name '*.tar.gz' -ls || echo "No source distributions found"
205
+
197
206
- name : Determine pre-compiled compatible wheel
198
207
env :
199
208
# NOTE: When `pip` is forced to colorize output piped into `jq`,
@@ -210,30 +219,72 @@ jobs:
210
219
NO_COLOR : 1
211
220
if : inputs.dist-type == 'binary'
212
221
id : wheel-file
213
- run : >
214
- echo -n path= | tee -a "${GITHUB_OUTPUT}"
215
-
216
-
217
- unset FORCE_COLOR
218
-
219
-
220
- python
221
- -X utf8
222
- -u -I
223
- -m pip install
224
- --find-links=./dist
225
- --no-index
226
- '${{ env.PROJECT_NAME }}'
227
- --force-reinstall
228
- --no-color
229
- --no-deps
230
- --only-binary=:all:
231
- --dry-run
232
- --report=-
233
- --quiet
234
- | jq --raw-output .install[].download_info.url
235
- | sed -e 's#^file://##' -e 's#%2B#+#'
236
- | tee -a "${GITHUB_OUTPUT}"
222
+ run : |
223
+ # Debug: Show environment variables
224
+ echo "PROJECT_NAME: ${{ env.PROJECT_NAME }}"
225
+ echo "GITHUB_WORKSPACE: $GITHUB_WORKSPACE"
226
+ echo "PWD: $(pwd)"
227
+
228
+ # Debug: Show pip version and configuration
229
+ echo -e "\n=== Pip Configuration ==="
230
+ python -m pip --version
231
+ python -m pip config list
232
+
233
+ # Debug: Show contents of dist/ directory
234
+ echo -e "\n=== Contents of dist/ directory ==="
235
+ ls -la dist/ 2>/dev/null || echo "dist/ directory does not exist"
236
+
237
+ # Debug: Try to list available distributions
238
+ echo -e "\n=== Available distributions ==="
239
+ python -m pip list --no-cache-dir --no-python-version-warning --no-color --format=json --find-links=./dist || true
240
+
241
+ # Debug: Try to find the wheel file directly
242
+ echo -e "\n=== Looking for wheel files ==="
243
+ find dist/ -name '*.whl' -ls 2>/dev/null || echo "No wheel files found"
244
+
245
+ # Run the actual command with more verbose output
246
+ echo -e "\n=== Running wheel detection command ==="
247
+ set -x # Enable command echoing
248
+
249
+ # Store the output in a variable for debugging
250
+ WHEEL_PATH=$(
251
+ python \
252
+ -X utf8 \
253
+ -u -I \
254
+ -m pip install \
255
+ --find-links=./dist \
256
+ --no-index \
257
+ "${{ env.PROJECT_NAME }}" \
258
+ --force-reinstall \
259
+ --no-color \
260
+ --no-deps \
261
+ --only-binary=:all: \
262
+ --dry-run \
263
+ --report=- \
264
+ --verbose 2>&1 \
265
+ | tee pip_debug.log \
266
+ | jq --raw-output '.install[].download_info.url // ""' \
267
+ | grep -v '^$' \
268
+ | head -1 \
269
+ | sed -e 's#^file://##' -e 's#%2B#+#'
270
+ )
271
+
272
+ set +x # Disable command echoing
273
+
274
+ # Debug: Show the found wheel path
275
+ echo -e "\n=== Found wheel path ==="
276
+ echo "$WHEEL_PATH"
277
+
278
+ # If no wheel found, show the pip debug log
279
+ if [ -z "$WHEEL_PATH" ]; then
280
+ echo -e "\n=== Pip debug log ==="
281
+ cat pip_debug.log || true
282
+ echo -e "\n=== No wheel found, listing all files in dist/ ==="
283
+ find dist/ -type f -ls || true
284
+ fi
285
+
286
+ # Output the result (empty if no wheel found)
287
+ echo "path=$WHEEL_PATH" | tee -a "${GITHUB_OUTPUT}"
237
288
shell : bash
238
289
239
290
- name : >-
0 commit comments