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 all 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
25 changes: 4 additions & 21 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ environment:
global:
MINGW_32: C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin
MINGW_64: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin
OPENBLAS_32: "https://3f23b170c54c2533c070-1c8a9b3114517dc5fe17b7c3f8c63a43.ssl.cf2.rackcdn.com/openblas-v0.3.7-win32-gcc_7_1_0.zip"
OPENBLAS_64: "https://3f23b170c54c2533c070-1c8a9b3114517dc5fe17b7c3f8c63a43.ssl.cf2.rackcdn.com/openblas-v0.3.7-win_amd64-gcc_7_1_0.zip"

CYTHON_BUILD_DEP: Cython
TEST_MODE: fast
Expand Down Expand Up @@ -88,33 +86,18 @@ install:
python -c "import sys,platform,struct;
print(sys.platform, platform.machine(), struct.calcsize('P') * 8, )"

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

# Download and install static "openblas.a" to PYTHON\lib
- ps: |
$PYTHON_ARCH = $env:PYTHON_ARCH
$PYTHON = $env:PYTHON
If ($PYTHON_ARCH -eq 32) {
$OPENBLAS = $env:OPENBLAS_32
} Else {
$OPENBLAS = $env:OPENBLAS_64
}
$clnt = new-object System.Net.WebClient
$file = "$(New-TemporaryFile).zip"
$tmpdir = New-TemporaryFile | %{ rm $_; mkdir $_ }
$lib = python numpy/tools/openblas_support.py
$destination = "$PYTHON\lib\openblas.a"
echo $file
echo $tmpdir
echo $OPENBLAS
$clnt.DownloadFile($OPENBLAS,$file)
Expand-Archive $file $tmpdir
rm $tmpdir\$PYTHON_ARCH\lib\*.dll.a
$lib = ls $tmpdir\$PYTHON_ARCH\lib\*.a | ForEach { ls $_ } | Select-Object -first 1
echo $lib
cp $lib $destination
ls $destination

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

# Install build requirements.
- pip install "%CYTHON_BUILD_DEP%" --install-option="--no-cython-compile"

Expand Down
20 changes: 11 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ env:
- BUILD_COMMIT=e94cec800304a6a467cf90ce4e7d3e207770b4b4
- BUILD_DEPENDS=cython
- TEST_DEPENDS="pytest hypothesis"
- PLAT=x86_64
- UNICODE_WIDTH=32
- WHEELHOUSE_UPLOADER_USERNAME=travis-worker
# Following generated with
# travis encrypt -r MacPython/numpy-wheels WHEELHOUSE_UPLOADER_SECRET=<the api key>
Expand All @@ -17,44 +15,48 @@ env:
- EXTRA_ARGV="'--disable-pytest-warnings'"

language: python
# Default Python version is usually 2.7
python: 3.6
sudo: required
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:
- MB_PYTHON_VERSION=3.6
- MB_ML_VER=2010
- PLAT=x86_64
- os: linux
env:
- 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
- MB_ML_VER=2010
- PLAT=x86_64
- os: linux
env:
- 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
- MB_ML_VER=2010
- PLAT=x86_64
- os: linux
env:
- 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
12 changes: 7 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,20 @@ How it works

The wheel-building repository:

* does a fresh build of any required C / C++ libraries;
* builds a numpy wheel, linking against these fresh builds;
* checks out either a known version of NumPy or master's HEAD
* downloads OpenBLAS using numpy/tools/openblas_support.py
* builds a numpy wheel, linking against the downloaded library and using
the appropriate additional variables from `env_vars.sh` or `env_vars32.sh`
* processes the wheel using delocate_ (OSX) or auditwheel_ ``repair``
(Manylinux1_). ``delocate`` and ``auditwheel`` copy the required dynamic
(manylinux_). ``delocate`` and ``auditwheel`` copy the required dynamic
libraries into the wheel and relinks the extension modules against the
copied libraries;
* uploads the built wheels to http://wheels.scipy.org (a Rackspace container
kindly donated by Rackspace to scikit-learn).

The resulting wheels are therefore self-contained and do not need any external
dynamic libraries apart from those provided as standard by OSX / Linux as
defined by the manylinux1 standard.
defined by the manylinux standard.

The ``.travis.yml`` file in this repository has a line containing the API key
for the Rackspace container encrypted with an RSA key that is unique to the
Expand Down Expand Up @@ -132,7 +134,7 @@ upload them to PyPI.

Of course, you will need permissions to upload to PyPI, for this to work.

.. _manylinux1: https://www.python.org/dev/peps/pep-0513
.. _manylinux: https://www.python.org/dev/peps/pep-0513
.. _twine: https://pypi.python.org/pypi/twine
.. _bs4: https://pypi.python.org/pypi/beautifulsoup4
.. _delocate: https://pypi.python.org/pypi/delocate
Expand Down
30 changes: 14 additions & 16 deletions config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,42 @@ 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 to
# download and un-tar the openblas libraries. The python call returns
# the un-tar root directory, then the files are copied into /usr/local.
# Could utilize a site.cfg instead to prevent the copy.
python -mpip install urllib3
basedir=$(python numpy/tools/openblas_support.py)
$use_sudo cp -r $basedir/lib/* /usr/local/lib
$use_sudo cp $basedir/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()'
}
6 changes: 6 additions & 0 deletions env_vars_32.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Environment variables for 32-bit build.
# The important difference from the 64-bit build is `-msse2` to
# compile sse loops for ufuncs.
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