feat: add initial project scaffold with Makefile, pyproject.toml, setup.cfg, and CLI entry point
Create the foundational project structure for the zamenyat HTTP content replacement bridge, including a Makefile with targets for environment setup, installation, formatting, and building; a pyproject.toml declaring setuptools as the build backend; a setup.cfg with package metadata, dependencies on the internal app library, and a console_scripts entry point; a README.md with a corrected heading and project description; a __main__.py module implementing argument parsing for host, port, upstream-host, and upstream-port; and an app.py module defining the Application class with async header parsing, connection tracking, and configurable buffer/header size constants.
2024-12-17 22:49:51 +01:00
|
|
|
BIN = ./.venv/bin/
|
|
|
|
|
PYTHON = ./.venv/bin/python
|
|
|
|
|
PIP = ./.venv/bin/pip
|
|
|
|
|
APP_NAME=zamenyat
|
|
|
|
|
|
|
|
|
|
all: install build
|
|
|
|
|
|
|
|
|
|
ensure_repo:
|
|
|
|
|
-@git init
|
|
|
|
|
|
|
|
|
|
ensure_env: ensure_repo
|
|
|
|
|
-@python3 -m venv .venv
|
|
|
|
|
|
|
|
|
|
install: ensure_env
|
|
|
|
|
$(PIP) install -e .
|
|
|
|
|
|
|
|
|
|
format:
|
|
|
|
|
$(PIP) install shed
|
|
|
|
|
. $(BIN)/activate && shed
|
|
|
|
|
|
|
|
|
|
build:
|
|
|
|
|
$(MAKE) format
|
|
|
|
|
$(PIP) install build
|
|
|
|
|
$(PYTHON) -m build
|
|
|
|
|
|
|
|
|
|
run:
|
2024-12-29 21:05:43 +01:00
|
|
|
$(BIN)$(APP_NAME) --host="0.0.0.0" --port=3046 --upstream-host="localhost" --upstream-port=8082
|
|
|
|
|
run2:
|
|
|
|
|
$(BIN)$(APP_NAME) --host="0.0.0.0" --port=3046 --upstream-host="localhost" --upstream-port=9999
|
|
|
|
|
|
feat: add initial project scaffold with Makefile, pyproject.toml, setup.cfg, and CLI entry point
Create the foundational project structure for the zamenyat HTTP content replacement bridge, including a Makefile with targets for environment setup, installation, formatting, and building; a pyproject.toml declaring setuptools as the build backend; a setup.cfg with package metadata, dependencies on the internal app library, and a console_scripts entry point; a README.md with a corrected heading and project description; a __main__.py module implementing argument parsing for host, port, upstream-host, and upstream-port; and an app.py module defining the Application class with async header parsing, connection tracking, and configurable buffer/header size constants.
2024-12-17 22:49:51 +01:00
|
|
|
|
|
|
|
|
|