@@ -125,69 +125,4 @@ function cmd_notexit {
125125# Build OpenBLAS
126126source build-openblas.sh
127127
128-
129- ls libs/openblas* > /dev/null 2>&1 && true
130- if [ " $? " != " 0" ]; then
131- # inside docker
132- cd /project
133- fi
134- PYTHON=${PYTHON:- python3.9}
135-
136- mkdir -p local/openblas
137- mkdir -p dist
138- $PYTHON -m pip install wheel auditwheel
139-
140- # This will fail if there is more than one file in libs
141- tar -C local/scipy_openblas64 --strip-components=2 -xf libs/openblas* .tar.gz
142-
143- # do not package the static libs and symlinks, only take the shared object
144- find local/scipy_openblas64/lib -maxdepth 1 -type l -delete
145- rm local/scipy_openblas64/lib/* .a
146- # Check that the pyproject.toml and the pkgconfig versions agree.
147- py_version=$( grep " ^version" pyproject.toml | sed -e " s/version = \" //" )
148- pkg_version=$( grep " version=" ./local/scipy_openblas64/lib/pkgconfig/scipy-openblas* .pc | sed -e " s/version=//" | sed -e " s/dev//" )
149- if [[ -z " $pkg_version " ]]; then
150- echo Could not read version from pkgconfig file
151- exit 1
152- fi
153- if [[ $py_version != $pkg_version * ]]; then
154- echo Version from pyproject.toml " $py_version " does not match version from build " pkg_version"
155- exit 1
156- fi
157-
158- if [ $( uname) == " Darwin" ]; then
159- soname=$( cd local/scipy_openblas64/lib; ls libscipy_openblas* .dylib)
160- echo otool -D local/scipy_openblas64/lib/$soname
161- otool -D local/scipy_openblas64/lib/$soname
162- # issue 153: there is a ".0" in the install_name. Remove it
163- # also add a @rpath
164- install_name_tool -id @rpath/$soname local/scipy_openblas64/lib/$soname
165- fi
166-
167- rm -rf local/scipy_openblas64/lib/pkgconfig
168- echo " " >> LICENSE.txt
169- echo " ----" >> LICENSE.txt
170- echo " " >> LICENSE.txt
171- if [ $( uname) == " Darwin" ]; then
172- cat tools/LICENSE_osx.txt >> LICENSE.txt
173- else
174- cat tools/LICENSE_linux.txt >> LICENSE.txt
175- fi
176-
177- if [ " ${INTERFACE64} " != " 1" ]; then
178- # rewrite the name of the project to scipy-openblas32
179- # this is a hack, but apparently there is no other way to change the name
180- # of a pyproject.toml project
181- #
182- # use the BSD variant of sed -i and remove the backup
183- sed -e " s/openblas64/openblas32/" -i.bak pyproject.toml
184- rm * .bak
185- mv local/scipy_openblas64 local/scipy_openblas32
186- sed -e " s/openblas_get_config64_/openblas_get_config/" -i.bak local/scipy_openblas32/__init__.py
187- sed -e " s/cflags =.*/cflags = '-DBLAS_SYMBOL_PREFIX=scipy_'/" -i.bak local/scipy_openblas32/__init__.py
188- sed -e " s/openblas64/openblas32/" -i.bak local/scipy_openblas32/__main__.py
189- sed -e " s/openblas64/openblas32/" -i.bak local/scipy_openblas32/__init__.py
190- rm local/scipy_openblas32/* .bak
191- fi
192-
193- rm -rf dist/*
128+ source tools/build_prepare.sh
0 commit comments