Skip to content

Commit

Permalink
Merge pull request #755 from openego/fixes/#753-fix-github-actions
Browse files Browse the repository at this point in the history
Fixes/#753 fix GitHub actions
  • Loading branch information
ClaraBuettner authored Aug 13, 2024
2 parents 5374cde + a4d2d28 commit ba3982d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def read(*names, **kwargs):
"setuptools >= 54.2.0",
"shapely",
"sqlalchemy < 2",
"tables < 3.9",
"tables",
"tilemapbase == 0.4.5",
"tsam",
],
Expand Down

0 comments on commit ba3982d

Please sign in to comment.