Skip to content

Commit 254bd8e

Browse files
committed
Merge branch 'python' of github.com:jeff-hykin/fornix
2 parents efb75a8 + fd542a5 commit 254bd8e

File tree

5 files changed

+23
-6
lines changed

5 files changed

+23
-6
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/nix/nix.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ load = [ "nodePackages", "pnpm", ]
7070
#
7171
# Python (because node-gyp depends on python)
7272
#
73-
7473
[[packages]]
7574
load = [ "python38",]
7675

@@ -87,7 +86,14 @@ load = [ "python38Packages", "virtualenv",]
8786
load = [ "python38Packages", "wheel",]
8887

8988
[[packages]]
90-
load = [ "poetry",]
89+
load = [ "cmake",]
90+
91+
[[packages]]
92+
load = [ "pkg-config",]
93+
94+
[[packages]]
95+
load = [ "libffi",]
96+
9197

9298

9399
#

settings/extensions/python/commands/ensure_pip_modules

Lines changed: 9 additions & 2 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
@@ -165,4 +169,7 @@ then
165169
unset __temp_var__command_name
166170
unset __temp_var__file_to_watch
167171
unset __temp_var__hash_check_name
168-
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/setup_venv

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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,7 @@ then
2121
"$FORNIX_FOLDER/settings/extensions/#standard/commands/tools/file_system/remove" "$FORNIX_HOME/.keras"
2222
"$FORNIX_FOLDER/settings/extensions/#standard/commands/tools/file_system/remove" "$FORNIX_HOME/.local/share/jupyter"
2323
"$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"
2427
fi

0 commit comments

Comments
 (0)