FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

MAINT: Massive update of files from main for numpy 1.26 by charris · Pull Request #24308 · numpy/numpy · GitHub

/ numpy Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .build  (2) .c  (1) .h  (2) .py  (17) .pyx  (7) .setuppy  (1) .sh  (3) .star  (1) .toml  (1) .txt  (3) .yml  (11) All 11 file types selected
Only manifest files
Deleted files Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
3 changes: 1 addition & 2 deletions .circleci/config.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ jobs:
name: build numpy
command: |
. venv/bin/activate
pip install --progress-bar=off --upgrade pip 'setuptools<49.2.0'
pip install --progress-bar=off -r test_requirements.txt
pip install --progress-bar=off -r doc_requirements.txt
pip install .
pip install . --config-settings=setup-args="-Dallow-noblas=true"

- run:
name: create release notes
Expand Down
26 changes: 19 additions & 7 deletions .cirrus.star
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,26 @@ def main(ctx):
SHA = env.get("CIRRUS_CHANGE_IN_REPO")
url = "https://api.github.com/repos/numpy/numpy/git/commits/" + SHA
dct = http.get(url).json()
# if "[wheel build]" in dct["message"]:
# return fs.read("ci/cirrus_wheels.yml")

if "[skip cirrus]" in dct["message"] or "[skip ci]" in dct["message"]:
commit_msg = dct["message"]
if "[skip cirrus]" in commit_msg or "[skip ci]" in commit_msg:
return []

# add extra jobs to the cirrus run by += adding to config
config = fs.read("tools/ci/cirrus_wheels.yml")
config += fs.read("tools/ci/cirrus_macosx_arm64.yml")
wheel = False
labels = env.get("CIRRUS_PR_LABELS", "")
pr_number = env.get("CIRRUS_PR", "-1")
tag = env.get("CIRRUS_TAG", "")

return config
if "[wheel build]" in commit_msg:
wheel = True

# if int(pr_number) > 0 and ("14 - Release" in labels or "36 - Build" in labels):
# wheel = True

if tag.startswith("v") and "dev0" not in tag:
wheel = True

if wheel:
return fs.read("tools/ci/cirrus_wheels.yml")

return fs.read("tools/ci/cirrus_macosx_arm64.yml")
36 changes: 8 additions & 28 deletions .github/workflows/build_test.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
if: github.event_name != 'push'
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "pypy3.9-v7.3.11"]
python-version: ["3.9", "3.10", "3.11", "pypy3.9-v7.3.12"]
env:
EXPECT_CPU_FEATURES: "SSE SSE2 SSE3 SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_KNL AVX512_KNM AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL"
steps:
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
# for add-apt-repository
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt install python3.9-dev -y
sudo apt install python3.9-dev ninja-build -y
sudo ln -s /usr/bin/python3.9 /usr/bin/pythonx
pythonx -m pip install --upgrade pip setuptools wheel
pythonx -m pip install -r test_requirements.txt
Expand Down Expand Up @@ -195,6 +195,7 @@ jobs:
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: ${{ env.PYTHON_VERSION }}

- uses: ./.github/actions

blas64:
Expand Down Expand Up @@ -287,26 +288,6 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
- uses: ./.github/actions

numpy2_flag:
needs: [smoke_test]
runs-on: ubuntu-latest
if: github.event_name != 'push'
env:
# Test for numpy-2.0 feature-flagged behavior.
NPY_NUMPY_2_BEHAVIOR: 1
# Using the future "weak" state doesn't pass tests
# currently unfortunately
NPY_PROMOTION_STATE: legacy
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: ./.github/actions

no_openblas:
needs: [smoke_test]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -361,11 +342,10 @@ jobs:
sudo apt update
sudo apt install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf gfortran-arm-linux-gnueabihf

# Keep the `test_requirements.txt` dependency-subset synced
docker run --name the_container --interactive -v /:/host arm32v7/ubuntu:22.04 /bin/bash -c "
docker run --name the_container --interactive -v /:/host -v $(pwd):/numpy arm32v7/ubuntu:22.04 /bin/bash -c "
apt update &&
apt install -y git python3 python3-dev python3-pip &&
python3 -m pip install cython==0.29.34 setuptools\<49.2.0 hypothesis==6.23.3 pytest==6.2.5 'typing_extensions>=4.2.0' &&
python3 -m pip install -r /numpy/test_requirements.txt
ln -s /host/lib64 /lib64 &&
ln -s /host/lib/x86_64-linux-gnu /lib/x86_64-linux-gnu &&
ln -s /host/usr/arm-linux-gnueabihf /usr/arm-linux-gnueabihf &&
Expand Down Expand Up @@ -443,7 +423,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Intel SDE
run: |
curl -o /tmp/sde.tar.xz https://downloadmirror.intel.com/751535/sde-external-9.14.0-2022-10-25-lin.tar.xz
curl -o /tmp/sde.tar.xz https://downloadmirror.intel.com/784319/sde-external-9.24.0-2023-07-13-lin.tar.xz
mkdir /tmp/sde && tar -xvf /tmp/sde.tar.xz -C /tmp/sde/
sudo mv /tmp/sde/* /opt/sde && sudo ln -s /opt/sde/sde64 /usr/bin/sde
- name: Install dependencies
Expand All @@ -454,14 +434,14 @@ jobs:
run: |
export CC=/usr/bin/gcc-12
export CXX=/usr/bin/g++-12
python -m pip install -e .
python setup.py develop
- name: Show config
run: |
python -c "import numpy as np; np.show_config()"
# Run only a few tests, running everything in an SDE takes a long time
# Using pytest directly, unable to use python runtests.py -n -t ...
# Disabled running in the SDE because of an SDE bug
- name: Run linalg/ufunc/umath tests
run: |
python -m pytest numpy/core/tests/test_umath* numpy/core/tests/test_ufunc.py numpy/linalg/tests/test_*
# Can't run on SDE just yet: see https://github.com/numpy/numpy/issues/23545#issuecomment-1659047365
#sde -spr -- python -m pytest numpy/core/tests/test_umath* numpy/core/tests/test_ufunc.py numpy/linalg/tests/test_*
7 changes: 6 additions & 1 deletion .github/workflows/emscripten.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ jobs:
run: pip install "pydantic<2" pyodide-build==$PYODIDE_VERSION

- name: Build
run: CFLAGS=-g2 LDFLAGS=-g2 pyodide build
run: |
# Pyodide is still in the process of adding better/easier support for
# non-setup.py based builds.
cp pyproject.toml.setuppy pyproject.toml
CFLAGS=-g2 LDFLAGS=-g2 pyodide build

- name: set up node
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0
Expand All @@ -67,6 +71,7 @@ jobs:
pyodide venv .venv-pyodide
source .venv-pyodide/bin/activate
pip install dist/*.whl
python -c "import sys; print(sys.platform)"
pip install -r test_requirements.txt
- name: Test
run: |
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/linux_meson.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
meson_spin:
if: "github.repository == 'numpy/numpy'"
runs-on: ubuntu-latest
strategy:
matrix:
USE_NIGHTLY_OPENBLAS: [false, true]
env:
USE_NIGHTLY_OPENBLAS: ${{ matrix.USE_NIGHTLY_OPENBLAS }}
name: "Test Linux (${{ matrix.USE_NIGHTLY_OPENBLAS && 'nightly' || 'stable' }} OpenBLAS)"
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
Expand All @@ -35,7 +41,15 @@ jobs:
- name: Install dependencies
run: |
pip install -r build_requirements.txt
sudo apt-get install -y libopenblas-serial-dev
# Install OpenBLAS
set -xe
if [[ $USE_NIGHTLY_OPENBLAS == "true" ]]; then
target=$(python tools/openblas_support.py --nightly)
else
target=$(python tools/openblas_support.py)
fi
sudo cp -r $target/lib/* /usr/lib
sudo cp $target/include/* /usr/include
- name: Build
shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
env:
Expand All @@ -52,6 +66,7 @@ jobs:
shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
env:
TERM: xterm-256color
LD_LIBRARY_PATH: "/usr/local/lib/" # to find libopenblas.so.0
run: |
pip install pytest hypothesis typing_extensions
spin test
pip install pytest pytest-xdist hypothesis typing_extensions
spin test -j auto
4 changes: 2 additions & 2 deletions .github/workflows/linux_musl.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ jobs:
RUNNER_OS=Linux sh tools/wheels/cibw_before_build.sh .

pip install -r build_requirements.txt
pip install pytest hypothesis typing_extensions
pip install pytest pytest-xdist hypothesis typing_extensions

# use meson to build and test
spin build
spin test
spin test -j auto
28 changes: 12 additions & 16 deletions .github/workflows/wheels.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
- cron: "42 1 * * 4"
- cron: "42 2 * * SUN,WED"
push:
pull_request:
types: [labeled, opened, synchronize, reopened]
Expand Down Expand Up @@ -78,8 +78,7 @@ jobs:
- [ubuntu-20.04, musllinux_x86_64]
- [macos-12, macosx_x86_64]
- [windows-2019, win_amd64]
- [windows-2019, win32]
python: ["cp39", "cp310", "cp311", "pp39"]
python: ["cp39", "cp310", "cp311", "cp312"] # "pp39"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'll try to re-enable this in a follow-up, it should work now.

exclude:
# Don't build PyPy 32-bit windows
- buildplat: [windows-2019, win32]
Expand All @@ -101,25 +100,20 @@ jobs:
# https://github.com/actions/checkout/issues/338
fetch-depth: 0

- name: pkg-config-for-win
run: |
choco install -y --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite
if: runner.os == 'windows'

# Used to push the built wheels
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: "3.x"

# We need rtools 4.0 to have 32 bit support on windows
- if: runner.os == 'windows'
uses: r-windows/install-rtools@ca1090c210479e995c03019a22b9798cdf57073a # main

- name: setup rtools for 32-bit
run: |
echo "PLAT=i686" >> $env:GITHUB_ENV
echo "PATH=c:\rtools40\mingw32\bin;$env:PATH" >> $env:GITHUB_ENV
gfortran --version
if: ${{ matrix.buildplat[1] == 'win32' }}

- name: Build wheels
uses: pypa/cibuildwheel@f21bb8376a051ffb6cb5604b28ccaef7b90e8ab7 # v2.14.1
env:
CIBW_PRERELEASE_PYTHONS: True
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}

- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
Expand Down Expand Up @@ -192,12 +186,14 @@ jobs:
python-version: "3.9"
- name: Build sdist
run: |
python setup.py sdist
python -m pip install -U pip build
python -m build --sdist -Csetup-args=-Dallow-noblas=true
- name: Test the sdist
run: |
# TODO: Don't run test suite, and instead build wheels from sdist
# Depends on pypa/cibuildwheel#1020
python -m pip install dist/*.gz
python -m pip install dist/*.gz -Csetup-args=-Dallow-noblas=true
pip install ninja
pip install -r test_requirements.txt
cd .. # Can't import numpy within numpy src directory
python -c "import numpy, sys; print(numpy.__version__); sys.exit(numpy.test() is False)"
Expand Down
41 changes: 38 additions & 3 deletions .github/workflows/windows_meson.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ permissions:
contents: read # to fetch code (actions/checkout)

jobs:
meson:
name: Meson windows build/test
msvc_64bit_python_openblas:
name: MSVC, x86-64, LP64 OpenBLAS
runs-on: windows-2019
# if: "github.repository == 'numpy/numpy'"
if: "github.repository == 'numpy/numpy'"
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
Expand Down Expand Up @@ -86,3 +86,38 @@ jobs:
echo "LASTEXITCODE is '$LASTEXITCODE'"
python -c "import numpy, sys; sys.exit(numpy.test(verbose=3) is False)"
echo "LASTEXITCODE is '$LASTEXITCODE'"

msvc_32bit_python_openblas:
name: MSVC, 32-bit Python, no BLAS
runs-on: windows-2019
if: "github.repository == 'numpy/numpy'"
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
submodules: recursive
fetch-depth: 0

- name: Setup Python (32-bit)
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: '3.10'
architecture: 'x86'

- name: Setup MSVC (32-bit)
uses: bus1/cabuild/action/msdevshell@e22aba57d6e74891d059d66501b6b5aed8123c4d # v1
with:
architecture: 'x86'

- name: Build and install
run: |
python -m pip install . -v -Ccompile-args="-j2" -Csetup-args="-Dallow-noblas=true"

- name: Install test dependencies
run: |
python -m pip install -r test_requirements.txt

- name: Run test suite (fast)
run: |
cd tools
python -m pytest --pyargs numpy -m "not slow" -n2
Loading

Back | FazBrowse Home | New Git URL