Skip to content

Commit

Permalink
Use uv for requirements and pip handling
Browse files Browse the repository at this point in the history
  • Loading branch information
wummel committed Sep 18, 2024
1 parent 7f5fb0f commit 12fc29a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ __pycache__
/.envrc

# local development files
/bin
/todo.txt
/todo.txt.bak
/done.txt
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,20 @@ help: ## display this help section

.PHONY: init ## install pip and required development packages
init: requirements-dev.txt
pip install --upgrade pip==$(PIP_VERSION)
pip install -r $<
uv pip install --upgrade pip==$(PIP_VERSION)
uv pip install -r $<

.PHONY: localbuild ## install patool in local environment
localbuild:
pip install --editable .
uv pip install --editable .


############ Build and release targets ############

.PHONY: clean
clean: ## remove generated python, web page files and all local patool installations
python setup.py clean --all
pip uninstall --yes patool
uv pip uninstall patool
$(MAKE) -C doc/web clean

.PHONY: distclean
Expand Down Expand Up @@ -173,8 +173,8 @@ checkoutdated: ## Check for outdated Python requirements
# In this case, grep exits with exitcode 1. Test for this after running grep.
@set +e; \
echo "Check for outdated Python packages"; \
pip list --format=columns --outdated | \
grep -E "($(shell cat requirements-dev.txt | grep == | cut -f1 -d= | sort | paste -sd '|' | sed -e 's/|/ |/g') )"; \
uv pip list --format=freeze |sed 's/==.*//' | uv pip compile - --color=never --quiet --no-deps --no-header --no-annotate |diff <(uv pip list --format=freeze) - --side-by-side --suppress-common-lines | \
grep -iE "( $(shell cat requirements-dev.txt | grep == | cut -f1 -d= | cut -f1 -d[ | sort | paste -sd '|' | sed -e 's/|/|\t/g') )"; \
test $$? = 1


Expand Down

0 comments on commit 12fc29a

Please sign in to comment.