Skip to content

Instantly share code, notes, and snippets.

@Friedjof
Created August 23, 2024 11:54
Show Gist options
  • Save Friedjof/d4b1e5b4dfc6df754d3ab604f31ff1c8 to your computer and use it in GitHub Desktop.
Save Friedjof/d4b1e5b4dfc6df754d3ab604f31ff1c8 to your computer and use it in GitHub Desktop.
Diese Makefile kann dazu genutzt werden eigene Python-Pakete auf PyPI.org zu veröffentlichen. Ändere den Prjektnamen in der ersten Zeile.
PACKAGE_NAME = <Mein-Projekt-Name>
PYTHON = python3
BUILD_DIR = build
DIST_DIR = dist
.PHONY: all build install uninstall clean test
all: build
build:
$(PYTHON) -m build
install: build
pipx install .
install-venv: build
pip install .
uninstall:
pipx uninstall $(PACKAGE_NAME)
uninstall-venv:
pip uninstall $(PACKAGE_NAME)
clean:
rm -rf $(BUILD_DIR) $(DIST_DIR) *.egg-info
upload: build
twine upload $(DIST_DIR)/*
run:
$(PYTHON) -m $(PACKAGE_NAME).main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment