Skip to content

Commit 0e65e84

Browse files
committed
Fix sdist wheel dist targets
Signed-off-by: Mihai Criveti <[email protected]>
1 parent 3bcadba commit 0e65e84

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

Makefile

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -782,17 +782,29 @@ containerfile-update:
782782
# =============================================================================
783783
.PHONY: dist wheel sdist verify publish publish-testpypi
784784

785-
dist: clean ## Build wheel + sdist
786-
@/bin/bash -c "source $(VENV_DIR)/bin/activate && python3 -m build"
787-
@echo "🛠 Wheel & sdist written to ./dist"
788-
789-
wheel: ## Build wheel only
790-
@/bin/bash -c "source $(VENV_DIR)/bin/activate && python3 -m build -w"
791-
@echo "🛠 Wheel written to ./dist"
792-
793-
sdist: ## Build source distribution only
794-
@/bin/bash -c "source $(VENV_DIR)/bin/activate && python3 -m build -s"
795-
@echo "🛠 Source distribution written to ./dist"
785+
dist: clean ## Build wheel + sdist into ./dist
786+
@test -d "$(VENV_DIR)" || $(MAKE) --no-print-directory venv
787+
@/bin/bash -eu -c "\
788+
source $(VENV_DIR)/bin/activate && \
789+
python3 -m pip install --quiet --upgrade pip build && \
790+
python3 -m build"
791+
@echo '🛠 Wheel & sdist written to ./dist'
792+
793+
wheel: ## Build wheel only
794+
@test -d "$(VENV_DIR)" || $(MAKE) --no-print-directory venv
795+
@/bin/bash -eu -c "\
796+
source $(VENV_DIR)/bin/activate && \
797+
python3 -m pip install --quiet --upgrade pip build && \
798+
python3 -m build -w"
799+
@echo '🛠 Wheel written to ./dist'
800+
801+
sdist: ## Build source distribution only
802+
@test -d "$(VENV_DIR)" || $(MAKE) --no-print-directory venv
803+
@/bin/bash -eu -c "\
804+
source $(VENV_DIR)/bin/activate && \
805+
python3 -m pip install --quiet --upgrade pip build && \
806+
python3 -m build -s"
807+
@echo '🛠 Source distribution written to ./dist'
796808

797809
verify: dist ## Build, run metadata & manifest checks
798810
@/bin/bash -c "source $(VENV_DIR)/bin/activate && \

0 commit comments

Comments
 (0)