File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,19 @@ if [[ $arch == "arm64" ]]; then
22
22
arch=" aarch64"
23
23
fi
24
24
25
+ # On macOS, manually link the python libraries
26
+ if [[ ` uname -s` == " Darwin" ]] ; then
27
+ PYLIB=$( python -c " import sysconfig; print(sysconfig.get_config_var('LIBDIR'))" )
28
+ PYNAME=$( find $PYLIB -maxdepth 1 -name " libpython*" | grep -oE " [^/]+$" | grep -oE " python[0-9]+\.[0-9]+" || echo " python" )
29
+ LDFLAGS=" -L $PYLIB -l $PYNAME "
30
+ else
31
+ LDFLAGS=" "
32
+ fi
33
+
25
34
# Build with instrumentation
26
35
pip install -U -c constraints.txt setuptools-rust wheel setuptools
27
- RUSTFLAGS=" -Cprofile-generate=$work_dir " pip install --prefer-binary -c constraints.txt -r requirements-dev.txt -e .
28
- RUSTFLAGS=" -Cprofile-generate=$work_dir " python setup.py build_rust --release --inplace
36
+ RUSTFLAGS=" -Cprofile-generate=$work_dir $LDFLAGS " pip install --prefer-binary -c constraints.txt -r requirements-dev.txt -e .
37
+ RUSTFLAGS=" -Cprofile-generate=$work_dir $LDFLAGS " python setup.py build_rust --release --inplace
29
38
# Run profile data generation
30
39
31
40
QISKIT_PARALLEL=FALSE stestr run --abbreviate
You can’t perform that action at this time.
0 commit comments