Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
numba
GitHub Repository: numba/llvmlite
Path: blob/main/buildscripts/manylinux/build_llvmlite.sh
1154 views
1
#!/bin/bash
2
set -ex
3
4
cd $(dirname $0)
5
source ./prepare_miniconda.sh $1
6
7
8
# Move to source root
9
cd ../..
10
sourceroot=$(pwd)
11
12
# Make conda environmant for llvmdev
13
pyver=$2
14
envname="llvmbase"
15
outputdir="/root/llvmlite/docker_output"
16
LLVMDEV_ARTIFACT_PATH=${3:-""}
17
18
ls -l /opt/python/$pyver/bin
19
20
conda create -y -n $envname
21
conda activate $envname
22
# Install llvmdev
23
24
if [ -n "$LLVMDEV_ARTIFACT_PATH" ] && [ -d "$LLVMDEV_ARTIFACT_PATH" ]; then
25
conda install -y "$LLVMDEV_ARTIFACT_PATH"/llvmdev-*.conda --no-deps
26
else
27
conda install -y -c defaults numba/label/llvm20-wheel::llvmdev=20 --no-deps
28
fi
29
30
# Prepend builtin Python Path
31
export PATH=/opt/python/$pyver/bin:$PATH
32
33
echo "Using python: $(which python)"
34
35
# Python 3.12+ won't have setuptools pre-installed
36
pip install setuptools
37
38
# Clean up
39
python setup.py clean
40
41
# Configure build via env vars
42
export LLVMLITE_PACKAGE_FORMAT="wheel"
43
44
# Build wheel
45
distdir=$outputdir/dist_$(uname -m)_$pyver
46
rm -rf $distdir
47
python setup.py bdist_wheel -d $distdir
48
49
# Audit wheel
50
cd $distdir
51
auditwheel --verbose repair *.whl
52
53
cd wheelhouse
54
ls
55
56