@@ -230,46 +230,23 @@ jobs:
230
230
python -m twine check dist/*.tar.gz
231
231
python -m twine check dist/*.whl
232
232
233
- # Verification step to ensure sdist is complete
234
- - name : Verify sdist can build wheel
233
+ - name : Verify sdist content
235
234
run : |
236
- python -m pip install build setuptools wheel
237
235
mkdir -p /tmp/sdist_test
238
236
239
- # List all files in dist directory
240
- echo "Files in dist directory:"
241
- ls -la dist/
242
-
243
- # Extract only the basemap sdist
244
- BASEMAP_SDIST=$(ls dist/basemap-*.tar.gz 2>/dev/null || echo "")
245
-
246
- if [ -z "$BASEMAP_SDIST" ]; then
247
- echo "Basemap sdist not found with pattern 'basemap-*.tar.gz', trying alternative patterns..."
248
- BASEMAP_SDIST=$(ls dist/*basemap*.tar.gz 2>/dev/null | head -1 || echo "")
249
- fi
250
-
251
- if [ -z "$BASEMAP_SDIST" ]; then
252
- echo "ERROR: Could not find any basemap sdist"
253
- exit 1
254
- fi
255
-
256
- echo "Using sdist: $BASEMAP_SDIST"
257
-
258
- # Extract just the one sdist file
237
+ # Find and extract basemap sdist
238
+ BASEMAP_SDIST=$(ls dist/basemap-*.tar.gz 2>/dev/null || ls dist/*basemap*.tar.gz 2>/dev/null | head -1)
259
239
tar -xvf "$BASEMAP_SDIST" -C /tmp/sdist_test
260
240
261
- # Enter extracted directory
262
- cd /tmp/sdist_test/*/
263
-
264
- # Install and build
265
- python -m pip install -e .
266
- python -m build --wheel
241
+ # Verify contents
242
+ echo "Files in extracted sdist:"
243
+ find /tmp/sdist_test -type f | grep -v "__pycache__" | sort
267
244
268
- # Check for built wheel
269
- if [ -d "dist " ]; then
270
- ls -la dist/*.whl || echo "No wheels found in dist directory "
245
+ # Check for critical files
246
+ if [ -f "$(find /tmp/sdist_test -name "_geoslib.pyx") " ]; then
247
+ echo "✓ Source files verified in sdist "
271
248
else
272
- echo "No dist directory created "
249
+ echo "✗ Missing critical source files in sdist "
273
250
exit 1
274
251
fi
275
252
0 commit comments