File tree 1 file changed +22
-12
lines changed
1 file changed +22
-12
lines changed Original file line number Diff line number Diff line change 9
9
10
10
set -e
11
11
12
- # Required to resolve `locale.Error: unsupported locale setting`
13
- export LC_ALL=en_US.UTF-8
14
-
15
- # Vercel-specific commands and configurations
16
- if ! [[ " $OSTYPE " =~ " darwin" * ]]; then
17
- echo " Detected non-Darwin host. Running Vercel-specific commands and configurations"
18
-
19
- if ! command -v uv & > /dev/null; then
20
- curl -LsSf https://astral.sh/uv/install.sh | sh
21
-
22
- # shellcheck source=/dev/null
23
- source " $HOME /.local/bin/env"
12
+ uv_install () {
13
+ if command -v uv & > /dev/null; then
14
+ echo " uv is already installed in this environment..."
15
+ else
16
+ curl -LsSf https://astral.sh/uv/install.sh | sh
17
+ source " $HOME /.local/bin/env"
24
18
fi
19
+ }
25
20
21
+ uv_activate_venv () {
26
22
uv python install 3.11
27
23
uv venv
28
24
source .venv/bin/activate
29
25
uv pip install tox
26
+ }
27
+
28
+ # https://vercel.com/docs/projects/environment-variables/system-environment-variables#VERCEL
29
+ if [ " $VERCEL " = " 1" ]; then
30
+ echo " Detected Vercel environment. Running Vercel-specific commands and configurations."
31
+ # Required to resolve `locale.Error: unsupported locale setting`
32
+ export LC_ALL=C.UTF-8
33
+ uv_install
34
+ uv_activate_venv
35
+ fi
36
+
37
+ # Required to resolve `locale.Error: unsupported locale setting`
38
+ if [[ -z " $LC_ALL " && " $( uname) " == " Darwin" ]]; then
39
+ export LC_ALL=en_US.UTF-8
30
40
fi
31
41
32
42
echo " Running sphinx-mdx and copying files to \` docs/api/python-api\` "
You can’t perform that action at this time.
0 commit comments