Skip to content

Commit ced1817

Browse files
committed
Add diagnostics to try and figure out what is failing
1 parent f5fb9c3 commit ced1817

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

.github/workflows/release-wheels.yml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,44 @@ jobs:
146146
source .venv-test/bin/activate
147147
uv pip install --upgrade pip
148148
uv pip install "$wheel"
149-
python -c "import hgraph, hgraph._hgraph; print('ok')"
149+
echo "--- Python and site-packages diagnostics ---"
150+
python - <<'PY'
151+
import sys, sysconfig, site
152+
print('python:', sys.executable)
153+
print('version:', sys.version)
154+
print('purelib:', sysconfig.get_paths().get('purelib'))
155+
print('platlib:', sysconfig.get_paths().get('platlib'))
156+
print('site.getsitepackages():', getattr(site, 'getsitepackages', lambda: [])())
157+
PY
158+
echo "--- hgraph install location and native module presence ---"
159+
python - <<'PY'
160+
import importlib.util, pathlib
161+
spec = importlib.util.find_spec('hgraph')
162+
print('find_spec(hgraph):', spec)
163+
if spec and spec.submodule_search_locations:
164+
pkg_dir = pathlib.Path(list(spec.submodule_search_locations)[0])
165+
print('hgraph dir:', pkg_dir)
166+
for p in sorted(pkg_dir.glob('_hgraph*')):
167+
print('found in hgraph/:', p.name)
168+
PY
169+
echo "--- Wheel contents under hgraph/ ---"
170+
python - <<'PY'
171+
import glob, zipfile
172+
wheels = glob.glob('wheelhouse/*.whl')
173+
print('wheels:', wheels)
174+
with zipfile.ZipFile(wheels[0]) as z:
175+
for n in sorted(z.namelist()):
176+
if n.startswith('hgraph/'):
177+
print(' ', n)
178+
PY
179+
echo "--- Import test ---"
180+
python - <<'PY'
181+
import importlib.util
182+
print(importlib.util.find_spec('hgraph'))
183+
print(importlib.util.find_spec('hgraph._hgraph'))
184+
import hgraph, hgraph._hgraph as m
185+
print('ok:', bool(getattr(m, '__doc__', None)))
186+
PY
150187
151188
- name: Test a built wheel (basic import) [Windows]
152189
if: runner.os == 'Windows'

0 commit comments

Comments
 (0)