Repo scaffolding (LICENSE, Makefile, pyproject.toml, README) matching unfeed conventions. Flat package layout, ruff config, Unlicense. ETF codec covers the subset needed for gen_call against an Elixir node: small/int/big_int, atom_utf8 (legacy atom_ext on decode), binary, nil, list, small/large tuple, new_pid, newer_reference. Booleans round-trip as atoms true/false; Python None as atom nil; str encodes to utf-8 binary to match Elixir convention. Golden vectors were generated from real Erlang term_to_binary/1 output (generator script at docs/etf_vectors.erl). Decode tests verify wire compatibility; round-trip tests verify encoder consistency. make all green: 58 passed, lint clean. Next phases tracked in docs/ROADMAP.md (EPMD, handshake, channel, gen_call, TLS, unfeed integration).
42 lines
965 B
Makefile
42 lines
965 B
Makefile
VENV_DIR = $(shell pwd)/.venv
|
|
PYTHON = $(VENV_DIR)/bin/python
|
|
PIP = $(VENV_DIR)/bin/pip
|
|
PYTEST = $(VENV_DIR)/bin/pytest
|
|
RUFF = $(VENV_DIR)/bin/ruff
|
|
|
|
.DEFAULT_GOAL := all
|
|
.PHONY: all bootstrap venv install test lint format clean help
|
|
|
|
all: bootstrap test lint
|
|
|
|
help:
|
|
@echo "erldistpy targets"
|
|
@echo " make bootstrap - create venv, install editable + dev deps"
|
|
@echo " make test - run pytest"
|
|
@echo " make lint - ruff check"
|
|
@echo " make format - ruff format"
|
|
@echo " make clean - drop venv + caches"
|
|
|
|
venv:
|
|
test -d $(VENV_DIR) || python3 -m venv $(VENV_DIR)
|
|
$(PIP) install --upgrade pip wheel setuptools
|
|
|
|
bootstrap: venv
|
|
$(PIP) install -e ".[dev]"
|
|
|
|
install: bootstrap
|
|
|
|
test:
|
|
$(PYTEST) -v
|
|
|
|
lint:
|
|
$(RUFF) check erldistpy tests
|
|
|
|
format:
|
|
$(RUFF) format erldistpy tests
|
|
|
|
clean:
|
|
rm -rf $(VENV_DIR)
|
|
rm -rf .pytest_cache .ruff_cache
|
|
rm -rf build dist *.egg-info
|
|
find . -type d -name __pycache__ -exec rm -rf {} +
|