Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 46 additions & 34 deletions .github/workflows/_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -249,23 +249,29 @@ jobs:
--out "$TMPDIR"
cd ../..
mkdir -p openviking/lib
python3 -c "
import zipfile, glob, os, sys
whls = glob.glob(os.path.join('$TMPDIR', 'ragfs_python-*.whl'))
assert whls, 'maturin produced no wheel'
with zipfile.ZipFile(whls[0]) as zf:
for name in zf.namelist():
bn = os.path.basename(name)
if bn.startswith('ragfs_python') and (bn.endswith('.so') or bn.endswith('.pyd')):
dst = os.path.join('openviking', 'lib', bn)
with zf.open(name) as src, open(dst, 'wb') as f:
f.write(src.read())
os.chmod(dst, 0o755)
print(f'Extracted {bn} -> {dst}')
sys.exit(0)
print('ERROR: No ragfs_python .so/.pyd found in wheel')
sys.exit(1)
"
python3 <<PY
import glob
import os
import sys
import zipfile

whls = glob.glob(os.path.join("$TMPDIR", "ragfs_python-*.whl"))
assert whls, "maturin produced no wheel"

with zipfile.ZipFile(whls[0]) as zf:
for name in zf.namelist():
bn = os.path.basename(name)
if bn.startswith("ragfs_python") and (bn.endswith(".so") or bn.endswith(".pyd")):
dst = os.path.join("openviking", "lib", bn)
with zf.open(name) as src, open(dst, "wb") as f:
f.write(src.read())
os.chmod(dst, 0o755)
print(f"Extracted {bn} -> {dst}")
sys.exit(0)

print("ERROR: No ragfs_python .so/.pyd found in wheel")
sys.exit(1)
PY
rm -rf "$TMPDIR"
echo "Contents of openviking/lib/:"
ls -la openviking/lib/
Expand Down Expand Up @@ -456,23 +462,29 @@ sys.exit(1)
fi
cd ../..
mkdir -p openviking/lib
python3 -c "
import zipfile, glob, os, sys
whls = glob.glob(os.path.join('$TMPDIR', 'ragfs_python-*.whl'))
assert whls, 'maturin produced no wheel'
with zipfile.ZipFile(whls[0]) as zf:
for name in zf.namelist():
bn = os.path.basename(name)
if bn.startswith('ragfs_python') and (bn.endswith('.so') or bn.endswith('.pyd')):
dst = os.path.join('openviking', 'lib', bn)
with zf.open(name) as src, open(dst, 'wb') as f:
f.write(src.read())
os.chmod(dst, 0o755)
print(f'Extracted {bn} -> {dst}')
sys.exit(0)
print('ERROR: No ragfs_python .so/.pyd found in wheel')
sys.exit(1)
"
python3 <<PY
import glob
import os
import sys
import zipfile

whls = glob.glob(os.path.join("$TMPDIR", "ragfs_python-*.whl"))
assert whls, "maturin produced no wheel"

with zipfile.ZipFile(whls[0]) as zf:
for name in zf.namelist():
bn = os.path.basename(name)
if bn.startswith("ragfs_python") and (bn.endswith(".so") or bn.endswith(".pyd")):
dst = os.path.join("openviking", "lib", bn)
with zf.open(name) as src, open(dst, "wb") as f:
f.write(src.read())
os.chmod(dst, 0o755)
print(f"Extracted {bn} -> {dst}")
sys.exit(0)

print("ERROR: No ragfs_python .so/.pyd found in wheel")
sys.exit(1)
PY
rm -rf "$TMPDIR"
echo "Contents of openviking/lib/:"
ls -la openviking/lib/
Expand Down
Loading