Skip to content

Commit 7628698

Browse files
committed
Update Makefile to load venv for packaging targets
Signed-off-by: Mihai Criveti <[email protected]>
1 parent b0fa418 commit 7628698

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

Makefile

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -780,33 +780,34 @@ containerfile-update:
780780
# help: verify - Build + twine + check-manifest + pyroma (no upload)
781781
# help: publish - Verify, then upload to PyPI (needs TWINE_* creds)
782782
# =============================================================================
783-
.PHONY: dist wheel sdist verify publish
783+
.PHONY: dist wheel sdist verify publish publish-testpypi
784784

785785
dist: clean ## Build wheel + sdist
786-
python3 -m build
786+
@/bin/bash -c "source $(VENV_DIR)/bin/activate && python3 -m build"
787787
@echo "🛠 Wheel & sdist written to ./dist"
788788

789789
wheel: ## Build wheel only
790-
python3 -m build -w
790+
@/bin/bash -c "source $(VENV_DIR)/bin/activate && python3 -m build -w"
791791
@echo "🛠 Wheel written to ./dist"
792792

793793
sdist: ## Build source distribution only
794-
python3 -m build -s
794+
@/bin/bash -c "source $(VENV_DIR)/bin/activate && python3 -m build -s"
795795
@echo "🛠 Source distribution written to ./dist"
796796

797797
verify: dist ## Build, run metadata & manifest checks
798-
twine check dist/* # metadata sanity
799-
check-manifest # sdist completeness
800-
pyroma -d . # metadata quality score
798+
@/bin/bash -c "source $(VENV_DIR)/bin/activate && \
799+
twine check dist/* && \
800+
check-manifest && \
801+
pyroma -d ."
801802
@echo "✅ Package verified – ready to publish."
802803

803804
publish: verify ## Verify, then upload to PyPI
804-
twine upload dist/* # creds via env vars or ~/.pypirc
805+
@/bin/bash -c "source $(VENV_DIR)/bin/activate && twine upload dist/*"
805806
@echo "🚀 Upload finished – check https://pypi.org/project/$(PROJECT_NAME)/"
806807

807-
publish-testpypi: verify ## Verify, then upload to TestPyPI
808-
twine upload --repository testpypi dist/* # creds via env vars or ~/.pypirc
809-
@echo "🚀 Upload finished – check https://pypi.org/project/$(PROJECT_NAME)/"
808+
publish-testpypi: verify ## Verify, then upload to TestPyPI
809+
@/bin/bash -c "source $(VENV_DIR)/bin/activate && twine upload --repository testpypi dist/*"
810+
@echo "🚀 Upload finished – check https://test.pypi.org/project/$(PROJECT_NAME)/"
810811

811812
# =============================================================================
812813
# 🦭 PODMAN CONTAINER BUILD & RUN

0 commit comments

Comments
 (0)