-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CI install failures on Windows (#1651)
Co-authored-by: Barret Schloerke <[email protected]>
- Loading branch information
Showing
2 changed files
with
30 additions
and
6 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 |
---|---|---|
|
@@ -3,7 +3,7 @@ requires = ["setuptools>=60", "wheel", "setuptools_scm>=8.0"] | |
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools] | ||
packages = {find = {include = ["shiny", "shiny.*"]}} | ||
packages = { find = { include = ["shiny", "shiny.*"] } } | ||
|
||
[tool.setuptools_scm] | ||
write_to = "shiny/_version.py" | ||
|
@@ -12,13 +12,11 @@ local_scheme = "no-local-version" | |
[project] | ||
name = "shiny" | ||
dynamic = ["version"] | ||
authors = [ | ||
{name = "Winston Chang", email = "[email protected]"}, | ||
] | ||
authors = [{ name = "Winston Chang", email = "[email protected]" }] | ||
description = "A web development framework for Python." | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
license = {text = "MIT"} | ||
license = { text = "MIT" } | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
|
@@ -67,7 +65,7 @@ test = [ | |
"psutil", | ||
"astropy", | ||
"suntime", | ||
"timezonefinder", | ||
"timezonefinder ; platform_system != 'Windows'", | ||
"ipyleaflet", | ||
"shinywidgets", | ||
"seaborn", | ||
|
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,9 +1,35 @@ | ||
import sys | ||
|
||
import pytest | ||
from example_apps import get_apps, reruns, reruns_delay, validate_example | ||
from playwright.sync_api import Page | ||
|
||
is_windows = sys.platform.startswith("win") | ||
|
||
|
||
@pytest.mark.flaky(reruns=reruns, reruns_delay=reruns_delay) | ||
@pytest.mark.parametrize("ex_app_path", get_apps("examples")) | ||
def test_examples(page: Page, ex_app_path: str) -> None: | ||
|
||
skip_on_windows_with_timezonefinder(ex_app_path) | ||
|
||
validate_example(page, ex_app_path) | ||
|
||
|
||
def skip_on_windows_with_timezonefinder(ex_app_path: str) -> None: | ||
if not is_windows: | ||
return | ||
if ex_app_path != "examples/airmass/app.py": | ||
return | ||
|
||
try: | ||
import timezonefinder # noqa: F401 # pyright: ignore | ||
|
||
# Future proofing: if timezonefinder is actually available on windows, raise an error | ||
raise RuntimeError( | ||
"This code believes timezonefinder is not available on windows. Please remove this check if it is no longer true." | ||
) | ||
except ImportError: | ||
pytest.skip( | ||
"timezonefinder has difficulty compiling on windows. Skipping example app. posit-dev/py-shiny#1651" | ||
) |