8000 update submodules to latest versions by mattip · Pull Request #73 · MacPython/numpy-wheels · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

update submodules to latest versions #73

Merged
merged 5 commits into from
Mar 7, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ install:
ls $destination

# Upgrade to the latest pip, setuptools, and wheel.
- python -m pip install -U pip setuptools wheel
- python -m pip install -U pip setuptools wheel urllib3

# Install build requirements.
- pip install "%CYTHON_BUILD_DEP%" --install-option="--no-cython-compile"
Expand Down
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@ env:
- EXTRA_ARGV="'--disable-pytest-warnings'"

language: python
# Default Python version is usually 2.7
python: 3.6
sudo: required
python: 3.7
dist: bionic
services: docker
os: linux

matrix:
exclude:
# Exclude the default Python 3.6 build
- python: 3.6
jobs:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lines 19-here update the confusing travis.yml: we don't have any python3.6 jobs to exclude, sudo is no longer needed, matrix should be replaced by jobs.

include:
- os: linux
env:
Expand All @@ -37,6 +33,8 @@ matrix:
- MB_PYTHON_VERSION=3.6
- MB_ML_VER=2010
- PLAT=i686
- ENV_VARS_PATH=env_vars_32.sh
- DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT}
- os: linux
env:
- MB_PYTHON_VERSION=3.7
Expand All @@ -46,6 +44,8 @@ matrix:
- MB_PYTHON_VERSION=3.7
- MB_ML_VER=2010
- PLAT=i686
- ENV_VARS_PATH=env_vars_32.sh
- DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT}
- os: linux
env:
- MB_PYTHON_VERSION=3.8
Expand All @@ -55,6 +55,8 @@ matrix:
- MB_PYTHON_VERSION=3.8
- MB_ML_VER=2010
- PLAT=i686
- ENV_VARS_PATH=env_vars_32.sh
- DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT}
- os: osx
language: generic
osx_image: xcode10.1
Expand Down
27 changes: 11 additions & 16 deletions config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,39 @@ function build_wheel {
local lib_plat=$PLAT
if [ -n "$IS_OSX" ]; then
install_gfortran
else
# For manylinux2010 builds with manylinux1 openblas builds
$use_sudo yum install -y libgfortran-4.4.7
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed to use the manylinux2010 openblas builds on the manylinux1 wheel builds. libfortran will be statically linked (uses the *.a file) so the wheels are still valid.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like the comment is backward. Maybe "Needed for manylinux1 wheels using libraries built for manylinux2010."

fi
build_libs $lib_plat
# Fix version error for development wheels by using bdist_wheel
build_bdist_wheel $@
}

function build_libs {
local plat=${1:-$PLAT}
# Force 64-bit OpenBLAS library for macOS intel (dual arch)
# builds. For these builds, we pretend to be dual arch, but in
# fact we're only using the 64-bit build of OpenBLAS
if [ -n $IS_OSX ] && [ $plat == intel ]; then
plat=x86_64
fi
local tar_fname=$(get_gf_lib "openblas-${OPENBLAS_VERSION}" "$plat")
local tar_path=$(abspath $tar_fname)
# Sudo needed for macOS
local use_sudo=""
[ -n "$IS_OSX" ] && use_sudo="sudo"
(cd / && $use_sudo tar zxf $tar_path)
# Use the same incantation as numpy/tools/travis-before-install.sh
python -mpip install urllib3
target=$(python numpy/tools/openblas_support.py)
Copy link
Contributor
@charris charris Mar 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange to call a command a target. Maybe explicitly use python on the next line. Where does the file come from?

EDIT: nvm.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a strange construction, it could use a comment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like what it does is download all the libraries into /var/tmp/openblas/. This could become rather inefficient if the libraries become numerous.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a comment and a todo to use site.cfg instead of copying.

$use_sudo cp -r $target/lib/* /usr/local/lib
$use_sudo cp $target/include/* /usr/local/include
}

function get_test_cmd {
local extra_argv=${1:-$EXTRA_ARGV}
echo "import sys; import numpy; \
sys.exit(not numpy.test('full', \
extra_argv=[${extra_argv}]))"
extra_argv=['-vv', ${extra_argv}]))"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For debugging?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

}

function run_tests {
# Runs tests on installed distribution from an empty directory
# We only run the 64 bit tests as of NumPy 1.16.
if [ -z "$IS_OSX" ]; then
apt-get -y update && apt-get install -y gfortran
fi
python -c "$(get_test_cmd)"
# Check bundled license file
python ../check_license.py
# Show BLAS / LAPACK used
# Show BLAS / LAPACK used. Since this uses a wheel we cannot use
# tools/openblas_config.py; tools is not part of what is shipped
python -c 'import numpy; numpy.show_config()'
}
4 changes: 4 additions & 0 deletions env_vars_32.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Environment variables for build
OPENBLAS_VERSION="v0.3.7"
MACOSX_DEPLOYMENT_TARGET=10.9
CFLAGS="-msse2 -std=c99 -fno-strict-aliasing"
Copy link
Contributor
@charris charris Mar 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is comes from env_vars.sh, correct? I assume the extra bit is -msse2. Is the latest multibuild is updated to use this. Is it documented in the README?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The needed bit is the -msse2. Commenting here, do you have a place in the README you would like to see it documented as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a line to the README, as well as explaining the OpenBLAS download

2 changes: 1 addition & 1 deletion gfortran-install
2 changes: 1 addition & 1 deletion numpy
Submodule numpy updated 1088 files
0