Make the vmnet Python package installable with pip install -e . to simplify the developer experience. Currently users need to manually create a venv, install dependencies, and source the venv before running scripts.
Current workflow
python3 -m venv .venv
source .venv/bin/activate
pip install pytest scapy pyyaml black
./example server
Proposed workflow
./bootstrap.sh # creates venv and installs everything (run once)
source venv # enter the venv (each new terminal)
pytest # run tests
vmnet run server # run vm named "server"
bootstap script
python3 -m venv .venv
ln -sf .venv/bin/activate venv
source venv
pip install -e ".[dev]"
After bootstrap, the user just needs source venv in new terminals, then all tools are available (pytest, vmnet run, vmnet bench).
Changes needed
- Add package metadata and entry points to
pyproject.toml
- Add dependency groups (core:
pyyaml, dev: pytest scapy black, bench: matplotlib numpy)
- Create a CLI entry point (
vmnet) with subcommands (run, bench)
- Update CI to use
pip install -e ".[dev]"
- Update README with simplified setup instructions
Benefits
- Single install command sets up everything
- Easier source command
- Dependencies are declared in one place (
pyproject.toml)
- Standard Python packaging — familiar to contributors
Make the vmnet Python package installable with
pip install -e .to simplify the developer experience. Currently users need to manually create a venv, install dependencies, and source the venv before running scripts.Current workflow
Proposed workflow
bootstap script
After bootstrap, the user just needs
source venvin new terminals, then all tools are available (pytest,vmnet run,vmnet bench).Changes needed
pyproject.tomlpyyaml, dev:pytest scapy black, bench:matplotlib numpy)vmnet) with subcommands (run,bench)pip install -e ".[dev]"Benefits
pyproject.toml)