Skip to content

Commit 5f913ce

Browse files
committed
Merge branch 'node' into pnpm
2 parents 5146299 + ae64893 commit 5f913ce

File tree

9 files changed

+43
-24
lines changed

9 files changed

+43
-24
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ authors = [""]
66

77
[tool.poetry.dependencies]
88
python = ">=3.7,<3.10"
9-
pip = "20.1.1"
109

1110
[tool.poetry.dev-dependencies]
1211

settings/extensions/#standard/commands/tools/fornix/merge_all_templates

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ gc python_package && gm python && gp && \
44
gc python_notebook && gm python && gp && \
55
gc node && gm python && gp && \
66
gc quik_github_pages && gm master && gp && \
7-
gc npm_package && gm master && gp && \
7+
gc npm_package && gm node && gp && \
88
gc deno_package && gm master && gp && \
9-
gc pnpm && gm master && gp && \
9+
gc pnpm && gm node && gp && \
1010
gc electron && gm master && gp && \
1111
gc prolog && gm master && gp && \
1212
gc ruby && gm master && gp && \
1313
gc rust && gm master && gp && \
1414
gc rust_druid && gm rust && gp && \
1515
gc rust_tauri && gm rust && gp && \
16-
gc textmate && gm master && gp && \
16+
gc textmate && gm node && gp && \
17+
gc textmate && gm ruby && gp && \
1718
gc crystal && gm master && gp && \
18-
gc master
19+
gc master

settings/extensions/nix/nix.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,30 +72,30 @@ from = "860b56be91fb874d48e23a950815969a7b832fbc"
7272
#
7373
# Python (because node-gyp depends on python)
7474
#
75-
7675
[[packages]]
7776
load = [ "python38",]
78-
from = "3f50332bc4913a56ad216ca01f5d0bd24277a6b2"
7977

8078
[[packages]]
8179
load = [ "python38Packages", "setuptools",]
82-
from = "3f50332bc4913a56ad216ca01f5d0bd24277a6b2"
8380

8481
[[packages]]
8582
load = [ "python38Packages", "pip",]
86-
from = "3f50332bc4913a56ad216ca01f5d0bd24277a6b2"
8783

8884
[[packages]]
8985
load = [ "python38Packages", "virtualenv",]
90-
from = "3f50332bc4913a56ad216ca01f5d0bd24277a6b2"
9186

9287
[[packages]]
9388
load = [ "python38Packages", "wheel",]
94-
from = "3f50332bc4913a56ad216ca01f5d0bd24277a6b2"
9589

9690
[[packages]]
97-
load = [ "poetry",]
98-
from = "3f50332bc4913a56ad216ca01f5d0bd24277a6b2"
91+
load = [ "cmake",]
92+
93+
[[packages]]
94+
load = [ "pkg-config",]
95+
96+
[[packages]]
97+
load = [ "libffi",]
98+
9999

100100
#
101101
# for .so errors on linux with opencv+ffmpeg

settings/extensions/nodejs/commands/check_node_modules

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ failed_check_command () {
6161
if [ $? -eq 0 ]
6262
then
6363
echo "[$__temp_var__command_name] Check finished (dependencies installed)"
64+
return 0
6465
else
6566
echo "[$__temp_var__command_name] Check failed: issues with $__temp_var__executable install"
67+
return 1
6668
fi
6769
}
6870

@@ -88,13 +90,11 @@ if [ -f "$__temp_var__file_to_watch" ]; then
8890
__temp_var__new_hash="$(cat "$__temp_var__file_to_watch" | md5sum)"
8991
# if something changed since last time; install!
9092
if [[ "$__temp_var__old_hash" != "$__temp_var__new_hash" ]]; then
91-
echo "$__temp_var__new_hash" > "$__temp_var__location_of_hash"
92-
failed_check_command
93+
failed_check_command && echo "$__temp_var__new_hash" > "$__temp_var__location_of_hash"
9394
else
9495
# CUSTOM check, if nothing is installed (after clean/purge) then install!
9596
if ! [[ -d "$FORNIX_FOLDER/node_modules" ]]; then
96-
echo "$__temp_var__new_hash" > "$__temp_var__location_of_hash"
97-
failed_check_command
97+
failed_check_command && echo "$__temp_var__new_hash" > "$__temp_var__location_of_hash"
9898
mkdir -p "$FORNIX_FOLDER/node_modules"
9999
else
100100
echo "[$__temp_var__command_name] Check Passed => assuming packages are installed"

settings/extensions/python/commands/add_project_to_pythonpath

100644100755
File mode changed.

settings/extensions/python/commands/ensure_pip_modules

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ then
4040
export FORNIX_FOLDER="$(dirname "$(dirname "$path_to_file")")"
4141
fi
4242

43+
# if poetry not installed, install it
44+
if ! python -c "import poetry" 2>/dev/null; then
45+
python -m pip --disable-pip-version-check install poetry==1.2.1 || python -m pip --disable-pip-version-check install poetry
46+
fi
4347

4448
#
45-
# check for python-poetry first
49+
# check for python-poetry
4650
#
4751
if [ -f "$FORNIX_FOLDER/pyproject.toml" ] && [ -n "$(command -v "poetry")" ]
4852
then
@@ -51,15 +55,21 @@ then
5155
__temp_var__file_to_watch="$FORNIX_FOLDER/pyproject.toml"
5256
__temp_var__hash_check_name="pip_poetry_modules"
5357
failed_check_command () {
58+
# for newer versions of poetry tell them to use the existing virtual env
59+
poetry config virtualenvs.path --unset 2>/dev/null
60+
poetry config virtualenvs.in-project true 2>/dev/null
61+
5462
# what to do when node modules haven't been installed yet
5563
poetry install
5664
# if successful
5765
if [ $? -eq 0 ]
5866
then
5967
echo "[$__temp_var__command_name] Check finished (dependencies installed)"
68+
return 0
6069
# if failed
6170
else
6271
echo "[$__temp_var__command_name] Check failed: issues with install"
72+
return 1
6373
fi
6474
}
6575

@@ -84,8 +94,7 @@ then
8494
__temp_var__new_hash="$(cat "$__temp_var__file_to_watch" | md5sum)"
8595
# if something changed since last time; install!
8696
if [ "$__temp_var__old_hash" != "$__temp_var__new_hash" ]; then
87-
echo "$__temp_var__new_hash" > "$__temp_var__location_of_hash"
88-
failed_check_command
97+
failed_check_command && echo "$__temp_var__new_hash" > "$__temp_var__location_of_hash"
8998
else
9099
echo "[$__temp_var__command_name] Check Passed => assuming packages are installed"
91100
fi
@@ -117,9 +126,11 @@ then
117126
if [ $? -eq 0 ]
118127
then
119128
echo "[$__temp_var__command_name] Check finished (dependencies installed)"
129+
return 0
120130
# if failed
121131
else
122132
echo "[$__temp_var__command_name] Check failed: issues with install"
133+
return 1
123134
fi
124135
}
125136

@@ -144,8 +155,7 @@ then
144155
__temp_var__new_hash="$(cat "$__temp_var__file_to_watch" | md5sum)"
145156
# if something changed since last time; install!
146157
if [ "$__temp_var__old_hash" != "$__temp_var__new_hash" ]; then
147-
echo "$__temp_var__new_hash" > "$__temp_var__location_of_hash"
148-
failed_check_command
158+
failed_check_command && echo "$__temp_var__new_hash" > "$__temp_var__location_of_hash"
149159
else
150160
echo "[$__temp_var__command_name] Check Passed => assuming packages are installed"
151161
fi
@@ -159,4 +169,7 @@ then
159169
unset __temp_var__command_name
160170
unset __temp_var__file_to_watch
161171
unset __temp_var__hash_check_name
162-
fi
172+
fi
173+
174+
# fix for https://askubuntu.com/questions/441744/pressing-enter-produces-m-instead-of-a-newline
175+
stty sane

settings/extensions/python/commands/refresh_ignores

100644100755
File mode changed.

settings/extensions/python/commands/setup_venv

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
export TMPDIR="$FORNIX_HOME/tmp.cleanable"
33
mkdir -p "$TMPDIR"
44
export VIRTUAL_ENV="$FORNIX_FOLDER/.venv"
5-
export PATH="$VIRTUAL_ENV/bin:$PATH"
5+
export PATH="$FORNIX_HOME/.local/bin:$PATH"
66
if ! [ -d "$VIRTUAL_ENV" ]
77
then
88
echo "creating virtual env for python"
@@ -11,5 +11,7 @@ then
1111
python -m venv "$VIRTUAL_ENV" && echo "virtual env created"
1212
fi
1313

14+
export PATH="$VIRTUAL_ENV/bin:$PATH"
15+
1416
# fix SSL issues
1517
export SSL_CERT_FILE="$(python -c 'import ssl; print(ssl.get_default_verify_paths().openssl_cafile)')"

settings/extensions/python/during_purge.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ then
1212

1313
# all the home folder junk from python and common pip modules
1414
"$FORNIX_FOLDER/settings/extensions/#standard/commands/tools/file_system/remove" "$FORNIX_HOME/.cache/pip"
15+
"$FORNIX_FOLDER/settings/extensions/#standard/commands/tools/file_system/remove" "$FORNIX_HOME/.cache/pypoetry/"
1516
"$FORNIX_FOLDER/settings/extensions/#standard/commands/tools/file_system/remove" "$FORNIX_HOME/.local/share/virtualenv"
1617
"$FORNIX_FOLDER/settings/extensions/#standard/commands/tools/file_system/remove" "$FORNIX_HOME/.config/pypoetry"
1718
"$FORNIX_FOLDER/settings/extensions/#standard/commands/tools/file_system/remove" "$FORNIX_HOME/.config/matplotlib"
@@ -20,4 +21,7 @@ then
2021
"$FORNIX_FOLDER/settings/extensions/#standard/commands/tools/file_system/remove" "$FORNIX_HOME/.keras"
2122
"$FORNIX_FOLDER/settings/extensions/#standard/commands/tools/file_system/remove" "$FORNIX_HOME/.local/share/jupyter"
2223
"$FORNIX_FOLDER/settings/extensions/#standard/commands/tools/file_system/remove" "$FORNIX_HOME/.python_history"
24+
"$FORNIX_FOLDER/settings/extensions/#standard/commands/tools/file_system/remove" "$FORNIX_HOME/Library/Application Support/pypoetry"
25+
"$FORNIX_FOLDER/settings/extensions/#standard/commands/tools/file_system/remove" "$FORNIX_HOME/Library/Application Support/virtualenv"
26+
"$FORNIX_FOLDER/settings/extensions/#standard/commands/tools/file_system/remove" "$FORNIX_HOME/Library/Library/Preferences/pypoetry"
2327
fi

0 commit comments

Comments
 (0)