diff --git a/pyproject.toml b/pyproject.toml index 8161316..3a4771c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta" [project] name = "scipy-openblas64" # v0.3.28 -version = "0.3.28.0.1" +version = "0.3.28.0.2" 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 1584830..0715c12 100644 --- a/tools/build_steps.sh +++ b/tools/build_steps.sh @@ -63,7 +63,6 @@ function build_lib { # BUILD_PREFIX - install suffix e.g. "/usr/local" # GFORTRAN_DMG # MB_ML_VER - echo running build_lib set -x local plat=${1:-$PLAT} local interface64=${2:-$INTERFACE64} @@ -72,16 +71,13 @@ function build_lib { # Make directory to store built archive if [ -n "$IS_OSX" ]; then # Do build, add gfortran hash to end of name - echo building on macox since IS_OSX is defined wrap_wheel_builder do_build_lib "$plat" "gf_${GFORTRAN_SHA:0:7}" "$interface64" "$nightly" return fi # Manylinux wrapper local libc=${MB_ML_LIBC:-manylinux} local docker_image=quay.io/pypa/${libc}${manylinux}_${plat} - echo pulling image ${docker_image} docker pull $docker_image - echo done pulling image, starting docker run # Docker sources this script, and runs `do_build_lib` docker run --rm \ -e BUILD_PREFIX="$BUILD_PREFIX" \ @@ -93,7 +89,6 @@ function build_lib { -e MB_ML_LIBC=${libc} \ -v $PWD:/io \ $docker_image /io/tools/docker_build_wrap.sh - echo done docker run of docker_build_wrap.sh } function patch_source { @@ -102,7 +97,7 @@ function patch_source { for f in $(ls ../patches); do echo applying patch $f git apply ../patches/$f - done + done } function do_build_lib { @@ -124,34 +119,34 @@ function do_build_lib { case $(get_os)-$plat in Linux-x86_64) local bitness=64 - local target_flags="TARGET=PRESCOTT" + local target="PRESCOTT" local dynamic_list="PRESCOTT NEHALEM SANDYBRIDGE HASWELL SKYLAKEX" ;; Darwin-x86_64) local bitness=64 - local target_flags="TARGET=CORE2" + local target="CORE2" # Pick up the gfortran runtime libraries export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH ;; *-i686) local bitness=32 - local target_flags="TARGET=PRESCOTT" + local target="PRESCOTT" local dynamic_list="PRESCOTT NEHALEM SANDYBRIDGE HASWELL" ;; Linux-aarch64) local bitness=64 - local target_flags="TARGET=ARMV8" + local target="ARMV8" ;; Darwin-arm64) local bitness=64 - local target_flags="TARGET=VORTEX" + local target="VORTEX" ;; *-s390x) local bitness=64 ;; *-ppc64le) local bitness=64 - local target_flags="TARGET=POWER8" + local target="POWER8" ;; *) echo "Strange plat value $plat"; exit 1 ;; esac @@ -176,21 +171,19 @@ function do_build_lib { patch_source echo start building if [ -v dynamic_list ]; then - CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized -fno-ident" \ - make BUFFERSIZE=20 DYNAMIC_ARCH=1 \ + CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \ + make BUFFERSIZE=20 DYNAMIC_ARCH=1 QUIET_MAKE=1 \ USE_OPENMP=0 NUM_THREADS=64 \ DYNAMIC_LIST="$dynamic_list" \ - BINARY=$bitness $interface_flags $target_flags shared 2>&1 1>/dev/null + BINARY="$bitness" $interface_flags \ + TARGET="$target" else - CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized -fno-ident" \ - make BUFFERSIZE=20 DYNAMIC_ARCH=1 \ + CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \ + make BUFFERSIZE=20 DYNAMIC_ARCH=1 QUIET_MAKE=1 \ USE_OPENMP=0 NUM_THREADS=64 \ - BINARY=$bitness $interface_flags $target_flags shared 2>&1 1>/dev/null + BINARY="$bitness" $interface_flags \ + TARGET="$target" fi - echo done building, now testing - make BUFFERSIZE=20 DYNAMIC_ARCH=1 \ - USE_OPENMP=0 NUM_THREADS=64 \ - BINARY=$bitness $interface_flags $target_flags tests make PREFIX=$BUILD_PREFIX $interface_flags install popd if [ "$nightly" = "1" ]; then diff --git a/tools/download-wheels.py b/tools/download-wheels.py index da96ec0..25a2aaa 100644 --- a/tools/download-wheels.py +++ b/tools/download-wheels.py @@ -63,7 +63,7 @@ def get_wheel_names(package, version): return soup.find_all(string=tmpl) -def download_wheels(package, version, wheelhouse): +def download_wheels(package, version, wheelhouse, test=False): """Download release wheels. The release wheels for the given package version are downloaded @@ -87,8 +87,15 @@ def download_wheels(package, version, wheelhouse): wheel_path = os.path.join(wheelhouse, wheel_name) with open(wheel_path, "wb") as f: with http.request("GET", wheel_url, preload_content=False,) as r: - print(f"{i + 1:<4}{wheel_name}") - shutil.copyfileobj(r, f) + info = r.info() + length = int(info.get('Content-Length', '0')) + if length == 0: + length = 'unknown size' + else: + length = f"{(length / 1024 / 1024):.2f}MB" + print(f"{i + 1:<4}{wheel_name} {length}") + if not test: + shutil.copyfileobj(r, f) print(f"\nTotal files downloaded: {len(wheel_names)}") @@ -107,6 +114,10 @@ def download_wheels(package, version, wheelhouse): default=os.path.join(os.getcwd(), "release", "installers"), help="Directory in which to store downloaded wheels\n" "[defaults to /release/installers]") + parser.add_argument( + "-t", "--test", + action = 'store_true', + help="only list available wheels, do not download") args = parser.parse_args() @@ -116,4 +127,4 @@ def download_wheels(package, version, wheelhouse): f"{wheelhouse} wheelhouse directory is not present." " Perhaps you need to use the '-w' flag to specify one.") - download_wheels(args.package, args.version, wheelhouse) + download_wheels(args.package, args.version, wheelhouse, test=args.test)