Skip to content

Commit

Permalink
Updated uv and requirements.txt to use uv instead of default pip
Browse files Browse the repository at this point in the history
  • Loading branch information
GatlenCulp committed Dec 29, 2024
1 parent ebe2d4c commit 4c7959d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions {{ cookiecutter.repo_name }}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ PYTHON_INTERPRETER = python
.PHONY: requirements
requirements:
{% if "requirements.txt" == cookiecutter.dependency_file -%}
{% if "uv" == cookiecutter.environment_manager -%}
uv pip install pip
uv pip install -r requirements.txt
{% else -%}
$(PYTHON_INTERPRETER) -m pip install -U pip
$(PYTHON_INTERPRETER) -m pip install -r requirements.txt
{% endif -%}
{% elif "environment.yml" == cookiecutter.dependency_file -%}
conda env update --name $(PROJECT_NAME) --file environment.yml --prune
{% elif "Pipfile" == cookiecutter.dependency_file -%}
Expand Down Expand Up @@ -90,6 +95,7 @@ create_environment:
@echo ">>> New pipenv created. Activate with:\npipenv shell"
{% elif cookiecutter.environment_manager == 'uv' -%}
uv venv
uv pip install pip
@echo ">>> New uv virtual environment created. Activate with:\nsource ./.venv/source/activate"
{% endif %}
{% endif %}
Expand Down

0 comments on commit 4c7959d

Please sign in to comment.