Skip to content

Commit

Permalink
Automation for embedding of virtualenv 16.7.10.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois committed Dec 11, 2020
1 parent ee42156 commit 06eff63
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pex/tools/commands/README.venv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
The [Venv](venv.py) command uses the [virtualenv](https://github.com/pypa/virtualenv) project to
suppport creating Python 2.7 virtual environments (The Python `venv` stdlib module was added only
in Python 3).

We use the last virtualenv version to support Python 2.7, embedding it as the
[virtualenv_16.7.10_py](virtualenv_16.7.10_py) resource via the
[embed_virtualenv.sh](/scripts/embed_virtualenv.sh) script.

10 changes: 10 additions & 0 deletions scripts/embed_virtualenv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

VIRTUALENV_16_7_10_RELEASE_SHA=941d218accf5e8b5672b3c528a73f7d5e2aa18bb

cd $(git rev-parse --show-toplevel)

curl --fail -L \
https://raw.githubusercontent.com/pypa/virtualenv/${VIRTUALENV_16_7_10_RELEASE_SHA}/virtualenv.py \
> pex/tools/commands/virtualenv_16.7.10_py

1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ deps =
tox
commands =
tox -e vendor
bash scripts/embed_virtualenv.sh
git diff --exit-code

[testenv:docs]
Expand Down

0 comments on commit 06eff63

Please sign in to comment.