-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathpython-matplotlib.sh
More file actions
43 lines (40 loc) · 1.36 KB
/
python-matplotlib.sh
File metadata and controls
43 lines (40 loc) · 1.36 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
package: python-matplotlib
version: "%(tag_basename)s"
tag: "v3.10.8"
source: https://github.com/matplotlib/matplotlib
requires:
- "Python:(slc|ubuntu)"
- "Python-system:(?!slc.*|ubuntu)"
- "FreeType:(?!osx)"
- libpng
- python-numpy
- python-contourpy
- python-cycler
- python-fonttools
- python-kiwisolver
- python-packaging
- python-pillow
- python-pyparsing
- python-dateutil
build_requires:
- uv
- alibuild-recipe-tools
prefer_system_check: |
python3 -c 'import matplotlib; print(matplotlib.__version__)' || exit 1
SYSTEM_VERSION=$(python3 -c 'import matplotlib; print(matplotlib.__version__)')
printf '%s\n%s\n' "$PKGVERSION" "$SYSTEM_VERSION" | sort -V -C
prepend_path:
PYTHONPATH: "$PYTHON_MATPLOTLIB_ROOT/lib/python/site-packages"
---
#!/bin/bash -e
pyver=$(python3 -c 'import sysconfig; print(sysconfig.get_python_version())')
TARGET="$INSTALLROOT/lib/python$pyver/site-packages"
mkdir -p "$TARGET"
uv pip install --no-deps --no-cache-dir --target="$TARGET" --python="$(command -v python3)" "matplotlib==$PKGVERSION"
ln -snf "python$pyver" "$INSTALLROOT/lib/python"
mkdir -p "$INSTALLROOT/etc/modulefiles"
alibuild-generate-module > "$INSTALLROOT/etc/modulefiles/$PKGNAME"
cat >> "$INSTALLROOT/etc/modulefiles/$PKGNAME" <<EOF
set PKG_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
prepend-path PYTHONPATH \$PKG_ROOT/lib/python/site-packages
EOF