This repository was archived by the owner on Feb 27, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwharf_cli
More file actions
executable file
·48 lines (42 loc) · 1.86 KB
/
wharf_cli
File metadata and controls
executable file
·48 lines (42 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
install ()
{
# Update apt
apt update
# piwheels' version of cffi depends on libffi7 (our distro ships with libffi8)
apt -y install libffi7
ldconfig
# Install poetry
curl -sSL https://install.python-poetry.org | python3 -
export PATH="/home/root/.local/bin:$PATH"
# Create local python environment (we use `echo ""` as a noop)
poetry run echo ""
### Link certain dependencies to the system-wide version. These dependencies
### can't install or run properly when installed through poetry.
# PyQt5 5.15.1 fails during install:
# AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
ln -sf /usr/lib/python3.9/site-packages/PyQt5* .venv/lib/python3.9/site-packages/
# cryptography fails at runtime:
# ImportError: /home/root/projects/wright/.venv/lib/python3.9/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so: undefined symbol: EVP_PBE_scrypt, version OPENSSL_1_1_0
ln -sf /usr/lib/python3.9/site-packages/cryptography* .venv/lib/python3.9/site-packages/
# numpy fails at runtime:
# ImportError: libcblas.so.3: cannot open shared object file: No such file or directory
ln -sf /usr/lib/python3.9/site-packages/numpy* .venv/lib/python3.9/site-packages/
# matplotlib fails at runtime:
# ImportError: numpy.core.multiarray failed to import
ln -sf /usr/lib/python3.9/site-packages/matplotlib* .venv/lib/python3.9/site-packages/
# mpl_toolkits fails at runtime:
# AttributeError: type object 'Axes' has no attribute '_shared_axes'
ln -sf /usr/lib/python3.9/site-packages/mpl_toolkits* .venv/lib/python3.9/site-packages/
# Install the remaining dependencies
poetry install -E gui
}
case "$1" in
install)
install
;;
*)
echo "Usage: wharf_cli { install }" >&2
exit 1
;;
esac