Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7aba410

Browse files
committed
pyenv is working, at least locally and without perfect isolation
1 parent 5c071ba commit 7aba410

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ gen/doc
1212

1313
# Python: Makefile lead dirs
1414
.pyenv-*
15-
.virtualenv
15+
.virtualenv.py
1616

1717
# Sublime
1818
*.sublime-workspace

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
.SUFFIXES:
33

44
VIRTUALENV_VERSION = 16.0.0
5-
VENV_BIN = .virtualenv/virtualenv.py
5+
VENV_BIN = ./.virtualenv.py
6+
VENV_VERSION = 20.2.2
67

78
VENV_DIR := .pyenv-$(shell uname)
89
PYTHON_BIN := $(VENV_DIR)/bin/python
@@ -63,12 +64,11 @@ $(PREPROC): $(PREPROC_DIR)/src/main.rs
6364
cd "$(PREPROC_DIR)" && cargo build --release
6465

6566
$(VENV_BIN):
66-
wget -nv https://pypi.python.org/packages/source/v/virtualenv/virtualenv-$(VIRTUALENV_VERSION).tar.gz -O virtualenv-$(VIRTUALENV_VERSION).tar.gz
67-
tar -xzf virtualenv-$(VIRTUALENV_VERSION).tar.gz && mv virtualenv-$(VIRTUALENV_VERSION) ./.virtualenv && rm -f virtualenv-$(VIRTUALENV_VERSION).tar.gz
68-
chmod +x $@
67+
python3 -m pip install virtualenv==$(VENV_VERSION) || python3 -m pip install --user virtualenv==$(VENV_VERSION)
68+
ln -s `which virtualenv` $@
6969

7070
$(PYTHON_BIN): $(VENV_BIN) requirements.txt
71-
$(VENV_BIN) -p python2.7 $(VENV_DIR)
71+
$(VENV_BIN) -p python3.8 $(VENV_DIR)
7272
$(PIP) install -r requirements.txt
7373

7474
$(MAKO_RENDER): $(PYTHON_BIN) $(wildcard $(MAKO_LIB_DIR)/*)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mako
1+
mako==1.1.3
22
pyyaml
33
mkdocs==0.16.3
44
pytest

0 commit comments

Comments
 (0)