diff --git a/pyproject.toml b/pyproject.toml index 508e9c2f..d60bc7e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ classifiers = [ dependencies = [ "PyYAML", "appdirs", - "build", + "build>=1", "psygnal>=0.3.0", "pydantic<2", "tomli-w", diff --git a/src/npe2/_inspection/_fetch.py b/src/npe2/_inspection/_fetch.py index d6577b96..95a18826 100644 --- a/src/npe2/_inspection/_fetch.py +++ b/src/npe2/_inspection/_fetch.py @@ -41,7 +41,6 @@ "fetch_manifest", "get_pypi_url", "get_hub_plugin", - "get_hub_plugins", "get_pypi_plugins", ] @@ -405,13 +404,6 @@ def get_pypi_plugins() -> Dict[str, str]: return _get_packages_by_classifier(NAPARI_CLASSIFIER) -@lru_cache -def get_hub_plugins() -> Dict[str, str]: - """Return {name: latest_version} for all plugins on the hub.""" - with request.urlopen("https://api.napari-hub.org/plugins") as r: - return json.load(r) - - @lru_cache def get_hub_plugin(plugin_name: str) -> Dict[str, Any]: """Return hub information for a specific plugin.""" diff --git a/src/npe2/_inspection/_full_install.py b/src/npe2/_inspection/_full_install.py index 32862ee1..27f59cdc 100644 --- a/src/npe2/_inspection/_full_install.py +++ b/src/npe2/_inspection/_full_install.py @@ -58,9 +58,9 @@ def isolated_plugin_env( """ # it's important that this import be lazy, otherwise we'll get a circular # import when serving as a setuptools plugin with `python -m build` - from build.env import IsolatedEnvBuilder + from build.env import DefaultIsolatedEnv - with IsolatedEnvBuilder() as env: + with DefaultIsolatedEnv() as env: # install the package pkg = f"{package}=={version}" if version else package logger.debug(f"installing {pkg} into virtual env") diff --git a/tests/test_fetch.py b/tests/test_fetch.py index 48f7fee8..6f03f377 100644 --- a/tests/test_fetch.py +++ b/tests/test_fetch.py @@ -9,7 +9,6 @@ from npe2._inspection._fetch import ( _manifest_from_pypi_sdist, get_hub_plugin, - get_hub_plugins, get_manifest_from_wheel, get_pypi_plugins, get_pypi_url, @@ -93,11 +92,6 @@ def test_get_manifest_from_wheel(tmp_path): assert mf.name == "affinder" -def test_get_hub_plugins(): - plugins = get_hub_plugins() - assert len(plugins) > 0 - - def test_get_hub_plugin(): info = get_hub_plugin("napari-svg") assert info["name"] == "napari-svg"