diff --git a/src/qemu_runner/make_runner/make.py b/src/qemu_runner/make_runner/make.py index 22646e6..846e2d3 100644 --- a/src/qemu_runner/make_runner/make.py +++ b/src/qemu_runner/make_runner/make.py @@ -31,7 +31,10 @@ def load_layers_from_all_search_paths(layer_names: List[str]) -> List[str]: eps = importlib.metadata.entry_points(group='qemu_runner_layer_packages') for ep in eps: - packages.append(ep.module_name) + module_name = getattr(ep, 'module', None) + if module_name is None: + module_name = ep.module_name + packages.append(module_name) return [load_layer(layer, packages=packages) for layer in layer_names] diff --git a/tests/test_venv.py b/tests/test_venv.py index f2e01b3..444f985 100644 --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -27,10 +27,6 @@ def install_script(builder: venv.EnvBuilder, context, name, url): os.unlink(distpath) -def install_setuptools(builder: venv.EnvBuilder, context): - subprocess.run([context.env_exe, '-m', 'pip', 'install', 'setuptools'], check=True) - - @pytest.fixture() def venv_py(tmp_path: Path) -> Path: venv_dir = tmp_path / 'venv' @@ -41,9 +37,6 @@ def create_venv(venv_dir: Path): builder = venv.EnvBuilder(with_pip=True) builder.create(venv_dir) ctx = builder.ensure_directories(venv_dir) - # builder.create_configuration(ctx) - # builder.setup_python(ctx) - install_setuptools(builder, ctx) return Path(ctx.env_exe) @@ -64,12 +57,8 @@ def make_runner(python: Path, args: List[str], cwd: Path): def install_dev_package(python: Path, pkg: Path): - cp = subprocess.run([ - python, - pkg / 'setup.py', - '-q', - 'install' - ], + cp = subprocess.run( + [python, '-m', 'pip', 'install', '-q', pkg], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='utf-8', diff --git a/tox.ini b/tox.ini index b76fbe8..5fd2a7f 100644 --- a/tox.ini +++ b/tox.ini @@ -12,8 +12,5 @@ python = 3.12: py312, mypy [testenv] -;download = true -;recreate = true -;alwayscopy = true deps = pytest commands = pytest tests \ No newline at end of file