-
Notifications
You must be signed in to change notification settings - Fork 792
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3338 from davidhewitt/3.12-numpy
ci: avoid failure to build numpy on 3.12
- Loading branch information
Showing
2 changed files
with
12 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,21 +1,24 @@ | ||
import nox | ||
import platform | ||
from nox.command import CommandFailed | ||
|
||
nox.options.sessions = ["test"] | ||
|
||
|
||
@nox.session | ||
def test(session): | ||
def test(session: nox.Session): | ||
session.install("-rrequirements-dev.txt") | ||
if platform.system() == "Linux" and platform.python_implementation() == "CPython": | ||
session.install("numpy>=1.16") | ||
try: | ||
session.install("--only-binary=numpy", "numpy>=1.16") | ||
except CommandFailed: | ||
# No binary wheel for numpy available on this platform | ||
pass | ||
session.install("maturin") | ||
session.run_always("maturin", "develop") | ||
session.run("pytest", *session.posargs) | ||
|
||
|
||
@nox.session | ||
def bench(session): | ||
def bench(session: nox.Session): | ||
session.install("-rrequirements-dev.txt") | ||
session.install(".") | ||
session.run("pytest", "--benchmark-enable", "--benchmark-only", *session.posargs) |
This file contains 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