Skip to content

Commit

Permalink
Do not test installation with python3.9 on macOS
Browse files Browse the repository at this point in the history
There are problems with the package tables that can not be resolved.
Checks work fine with another python version or OS.
  • Loading branch information
ClaraBuettner committed Aug 13, 2024
1 parent 23a6780 commit a4d2d28
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from pathlib import Path
from pprint import pformat
import platform

import nox

Expand Down Expand Up @@ -65,6 +66,15 @@ def flake8(session):
@nox.session(python=["3", "3.9", "3.10", "3.11"])
def build(session):
"""Build the package and check for packaging errors."""
# Get the current Python version and OS
current_version = session.python if session.python else "unknown"
current_os = platform.system()
print(f"Running install on Python {current_version} and OS {current_os}")

# Check if the current session is Python 3.9 on macOS and skip
if current_version == "3.9" and current_os == "Darwin":
session.skip("Skipping tests for Python 3.9 on macOS")

setdefaults(session)
session.install("twine")
session.run("python", "setup.py", "bdist", "bdist_wheel")
Expand All @@ -74,6 +84,15 @@ def build(session):
@nox.session(python=["3", "3.9", "3.10", "3.11"])
def install(session):
"""Install the package."""
# Get the current Python version and OS
current_version = session.python if session.python else "unknown"
current_os = platform.system()
print(f"Running install on Python {current_version} and OS {current_os}")

# Check if the current session is Python 3.9 on macOS and skip
if current_version == "3.9" and current_os == "Darwin":
session.skip("Skipping tests for Python 3.9 on macOS")

setdefaults(session)
session.env["SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL"] = "False"
session.run("python", "-mpip", "install", "--upgrade", "pip")
Expand Down

0 comments on commit a4d2d28

Please sign in to comment.