Skip to content

Commit 0ba9792

Browse files
fix ci/cd with uv
1 parent 67117b6 commit 0ba9792

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

makefile

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ version:
1414
# ---- Configurable variables ----
1515
PYTHON ?= python3
1616
PACKAGE ?= PythonRuns
17-
INDEX_URL ?= https://nexus.myrepo.net/repository/pypi-releases/simple
17+
#INDEX_URL ?= https://nexus.myrepo.net/repository/pypi-releases/simple # when using private repo (e.g., Nexus)
18+
INDEX_URL ?= https://pypi.org/simple
1819
EXTRA_INDEX_URL ?= https://pypi.org/simple
1920
REPOSITORY_UPLOAD ?= https://nexus.myrepo.net/repository/pypi-releases/
2021
UV_FLAGS := --index-url $(INDEX_URL) --extra-index-url $(EXTRA_INDEX_URL)
@@ -33,7 +34,8 @@ define log_done
3334
endef
3435

3536
.PHONY: sync install config update test test-coverage run pre-commit build deploy version help list clean \
36-
check-dist twine-check check-tools check-pytest check-precommit check-twine check-build check-uv
37+
check-dist twine-check check-tools check-pytest check-precommit check-twine check-build check-uv \
38+
requirements requirements-clean
3739

3840
# ---- Guard checks ----
3941
check-uv:
@@ -104,6 +106,17 @@ update: check-uv ## Update dependencies and regenerate lockfile
104106
uv sync
105107
$(call log_done,$@)
106108

109+
requirements: check-uv ## Export requirements.txt from pyproject.toml
110+
$(call log_start,$@)
111+
uv pip compile pyproject.toml -o requirements.txt $(UV_FLAGS)
112+
$(call log_done,$@)
113+
114+
requirements-clean: ## Delete requirements.txt
115+
$(call log_start,$@)
116+
rm -f requirements.txt
117+
@echo "requirements.txt deleted"
118+
$(call log_done,$@)
119+
107120
test: check-pytest ## Run tests (verbose)
108121
$(call log_start,$@)
109122
pytest --verbose

0 commit comments

Comments
 (0)