-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧 [maykinmedia/open-api-framework#81] Switch from pip-compile to UV
- Loading branch information
Showing
9 changed files
with
617 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,43 @@ | ||
#!/bin/bash | ||
|
||
#!/bin/sh | ||
# | ||
# Compile the dependencies for production, CI and development. | ||
# | ||
# Usage, in the root of the project: | ||
# | ||
# ./bin/compile_dependencies.sh | ||
# | ||
# Any extra flags/arguments passed to this wrapper script are passed down to pip-compile. | ||
# Any extra flags/arguments passed to this wrapper script are passed down to uv pip compile. | ||
# E.g. to update a package: | ||
# | ||
# ./bin/compile_dependencies.sh --upgrade-package django | ||
|
||
|
||
set -ex | ||
|
||
command -v uv || (echo "uv not found on PATH. Install it https://astral.sh/uv" >&2 && exit 1) | ||
|
||
cwd="${PWD}" | ||
toplevel=$(git rev-parse --show-toplevel) | ||
|
||
cd $toplevel | ||
cd "${toplevel}" | ||
|
||
export UV_CUSTOM_COMPILE_COMMAND="./bin/compile_dependencies.sh" | ||
|
||
# Base (& prod) deps | ||
pip-compile \ | ||
--no-emit-index-url \ | ||
uv pip compile \ | ||
--output-file requirements/base.txt \ | ||
"$@" \ | ||
requirements/base.in | ||
|
||
# Dependencies for testing | ||
pip-compile \ | ||
--no-emit-index-url \ | ||
uv pip compile \ | ||
--output-file requirements/ci.txt \ | ||
"$@" \ | ||
requirements/base.txt \ | ||
requirements/test-tools.in \ | ||
requirements/ci.in | ||
requirements/docs.in | ||
|
||
# Dev depedencies | ||
pip-compile \ | ||
--no-emit-index-url \ | ||
# Dev depedencies - exact same set as CI + some extra tooling | ||
uv pip compile \ | ||
--output-file requirements/dev.txt \ | ||
"$@" \ | ||
requirements/base.txt \ | ||
requirements/test-tools.in \ | ||
requirements/dev.in | ||
|
||
cd "${cwd}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.