Skip to content

Commit

Permalink
add python2 to setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-hykin committed Oct 5, 2021
1 parent 77fd3e2 commit dd5c564
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#
# Custom
#

.venv3
.venv2

#
# standard
Expand Down
6 changes: 6 additions & 0 deletions commands/pip2
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

# summary
#

VIRTUAL_ENV="$VIRTUAL_ENV2" PATH="$VIRTUAL_ENV2/bin:$PATH" python2 -m pip --disable-pip-version-check "$@"
6 changes: 6 additions & 0 deletions commands/python2
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

# summary
# this only exists so that pip for-sure corrisponds to the python command

VIRTUAL_ENV="$VIRTUAL_ENV2" PATH="$VIRTUAL_ENV2/bin:$PATH" python2 "$@"
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
future==0.18.2
20 changes: 20 additions & 0 deletions settings/extensions/nix/nix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,26 @@ from = "3f50332bc4913a56ad216ca01f5d0bd24277a6b2"
load = [ "python38Packages", "tkinter",]
from = "3f50332bc4913a56ad216ca01f5d0bd24277a6b2"

[[packages]]
load = [ "python2",]
from = "3f50332bc4913a56ad216ca01f5d0bd24277a6b2"

[[packages]]
load = [ "python2Packages", "setuptools",]
from = "3f50332bc4913a56ad216ca01f5d0bd24277a6b2"

[[packages]]
load = [ "python2Packages", "pip",]
from = "3f50332bc4913a56ad216ca01f5d0bd24277a6b2"

[[packages]]
load = [ "python2Packages", "virtualenv",]
from = "3f50332bc4913a56ad216ca01f5d0bd24277a6b2"

[[packages]]
load = [ "python2Packages", "wheel",]
from = "3f50332bc4913a56ad216ca01f5d0bd24277a6b2"

[[packages]]
load = [ "poetry",]
from = "3f50332bc4913a56ad216ca01f5d0bd24277a6b2"
Expand Down
4 changes: 3 additions & 1 deletion settings/extensions/python/commands/setup_venv
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# TMPDIR fixes a pip issue
export TMPDIR="$FORNIX_HOME/tmp.cleanable"
mkdir -p "$TMPDIR"
export VIRTUAL_ENV="$FORNIX_FOLDER/.venv"
export VIRTUAL_ENV2="$FORNIX_FOLDER/.venv2"
export VIRTUAL_ENV="$FORNIX_FOLDER/.venv3"
export PATH="$VIRTUAL_ENV/bin:$PATH"
if ! [ -d "$VIRTUAL_ENV" ]
then
echo "creating virtual env for python"
# run the cleanup
. "$FORNIX_FOLDER/settings/extensions/python/during_clean.sh"
python -m venv "$VIRTUAL_ENV" && echo "virtual env created"
python2 -m virtualenv "$VIRTUAL_ENV2"
fi

# fix SSL issues
Expand Down

0 comments on commit dd5c564

Please sign in to comment.