initial commit
Some checks failed
format / build (push) Failing after 6s

Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
ngn
2025-05-02 18:20:24 +03:00
commit ab580d6a18
17 changed files with 1482 additions and 0 deletions

40
Makefile Normal file
View File

@ -0,0 +1,40 @@
SCRIPTS = $(patsubst scripts/%.py,ups-%,$(wildcard scripts/*.py))
SCRIPTS += $(patsubst scripts/%.sh,ups-%,$(wildcard scripts/*.sh))
PY_SRCS = $(wildcard lib/*.py)
VERSION = $(shell grep 'version' pyproject.toml | cut -d' ' -f3 | sed 's/"//g')
WHEEL = dist/ups-$(VERSION)-py3-none-any.whl
PYTHON = python3
DESTDIR = ~/.local/bin
all: $(WHEEL)
$(WHEEL): $(PY_SRCS) pyproject.toml
python3 -m build
install: $(SCRIPTS)
$(PYTHON) -m pip install --force-reinstall \
--break-system-packages $(WHEEL)
ups-%: scripts/%.py
install -Dm755 $< $(DESTDIR)/$@
ups-%: scripts/%.sh
install -Dm755 $< $(DESTDIR)/$@
uninstall:
for script in $(TARGETS); do \
rm -f $(DESTDIR)/$$script; \
done
format:
black -l 80 */*.py
check:
black --check -l 80 */*.py
clean:
rm -rf dist
.PHONY: install uninstall format check clean