From c129bfc1d4bdb63e73ccc67478da644bc8f743a8 Mon Sep 17 00:00:00 2001 From: Matti Picus Date: Mon, 29 Jan 2024 19:28:01 +0200 Subject: [PATCH] tweak build for freebsd 'sed' and wheel version check --- pyproject.toml | 2 +- tools/build_steps.sh | 4 ++-- tools/build_wheel.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a6223f6..1195c90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta" [project] name = "scipy_openblas64" -version = "0.3.26.0.0" +version = "0.3.26.0" requires-python = ">=3.7" description = "Provides OpenBLAS for python packaging" readme = "README.md" diff --git a/tools/build_steps.sh b/tools/build_steps.sh index ac8bf07..74bb59b 100644 --- a/tools/build_steps.sh +++ b/tools/build_steps.sh @@ -188,9 +188,9 @@ function do_build_lib { static_libname=$(basename `find OpenBLAS -maxdepth 1 -type f -name '*.a' \! -name '*.dll.a'`) renamed_libname=$(basename `find OpenBLAS -maxdepth 1 -type f -name '*.renamed'`) cp -f "OpenBLAS/${renamed_libname}" "$BUILD_PREFIX/lib/${static_libname}" - sed -e "s/^Cflags.*/\0 -DBLAS_SYMBOL_PREFIX=scipy_ -DBLAS_SYMBOL_SUFFIX=64_/" -i.bak $BUILD_PREFIX/lib/pkgconfig/scipy-openblas.pc + sed -e "s/\(^Cflags.*\)/\1 -DBLAS_SYMBOL_PREFIX=scipy_ -DBLAS_SYMBOL_SUFFIX=64_/" -i.bak $BUILD_PREFIX/lib/pkgconfig/scipy-openblas.pc else - sed -e "s/^Cflags.*/\0 -DBLAS_SYMBOL_PREFIX=scipy_/" -i.bak $BUILD_PREFIX/lib/pkgconfig/scipy-openblas.pc + sed -e "s/\(^Cflags.*\)/\1 -DBLAS_SYMBOL_PREFIX=scipy_/" -i.bak $BUILD_PREFIX/lib/pkgconfig/scipy-openblas.pc fi local out_name="openblas${symbolsuffix}-${version}-${plat_tag}${suff}.tar.gz" diff --git a/tools/build_wheel.sh b/tools/build_wheel.sh index 9955e2b..72d5be8 100644 --- a/tools/build_wheel.sh +++ b/tools/build_wheel.sh @@ -24,7 +24,7 @@ find local/scipy_openblas64/lib -maxdepth 1 -type l -delete rm local/scipy_openblas64/lib/*.a # Check that the pyproject.toml and the pkgconfig versions agree. py_version=$(grep "^version" pyproject.toml | sed -e "s/version = \"//") -pkg_version=$(grep "version=" ./local/scipy_openblas64/lib/pkgconfig/scipy-openblas*.pc | sed -e "s/version=//") +pkg_version=$(grep "version=" ./local/scipy_openblas64/lib/pkgconfig/scipy-openblas*.pc | sed -e "s/version=//" | sed -e "s/dev//") if [[ -z "$pkg_version" ]]; then echo Could not read version from pkgconfig file exit 1