Skip to content

Commit

Permalink
Switch .env prefix to .venv for autoenv
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Dec 12, 2015
1 parent d941403 commit 2c4150a
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .gitignore
@@ -1,7 +1,7 @@
*.pyc
*.pyo
.env
.env3
.venv
.venv3
dist
*.egg
*.egg-info
Expand Down
4 changes: 2 additions & 2 deletions .tmuxp.json
Expand Up @@ -14,7 +14,7 @@
},
"layout": "main-horizontal",
"shell_command_before": [
"[ -d .env -a -f .env/bin/activate ] && source .env/bin/activate"
"[ -d .venv -a -f .venv/bin/activate ] && source .venv/bin/activate"
],
"focus": true,
"window_name": "tmuxp"
Expand All @@ -31,7 +31,7 @@
"start_directory": "doc/",
"layout": "main-horizontal",
"shell_command_before": [
"[ -d ../.env -a -f ../.env/bin/activate ] && source ../.env/bin/activate"
"[ -d ../.venv -a -f ../.venv/bin/activate ] && source ../.venv/bin/activate"
],
"options": {
"main-pane-height": 35
Expand Down
4 changes: 2 additions & 2 deletions .tmuxp.yaml
Expand Up @@ -8,7 +8,7 @@ windows:
options:
main-pane-height: 35
shell_command_before:
- '[ -d .env -a -f .env/bin/activate ] && source .env/bin/activate'
- '[ -d .venv -a -f .venv/bin/activate ] && source .venv/bin/activate'
panes:
- focus: true
- pane
Expand All @@ -19,7 +19,7 @@ windows:
main-pane-height: 35
start_directory: doc/
shell_command_before:
- '[ -d ../.env -a -f ../.env/bin/activate ] && source ../.env/bin/activate'
- '[ -d ../.venv -a -f ../.venv/bin/activate ] && source ../.venv/bin/activate'
panes:
- focus: true
- pane
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Expand Up @@ -68,8 +68,8 @@ install dev .. code-block:: bash

$ git clone https://github.com/tony/tmuxp.git tmuxp
$ cd ./tmuxp
$ virtualenv .env
$ source .env/bin/activate
$ virtualenv .venv
$ source .venv/bin/activate
$ pip install -e .

See the `developing and testing`_ page in the docs for
Expand Down
2 changes: 1 addition & 1 deletion bootstrap_env.py
Expand Up @@ -75,7 +75,7 @@ def which(exe=None, throw=True):


project_dir = os.path.dirname(os.path.realpath(__file__))
env_dir = os.path.join(project_dir, '.env')
env_dir = os.path.join(project_dir, '.venv')
pip_bin = os.path.join(env_dir, 'bin', 'pip')
python_bin = os.path.join(env_dir, 'bin', 'python')
virtualenv_bin = which('virtualenv', throw=False)
Expand Down
6 changes: 3 additions & 3 deletions doc/developing.rst
Expand Up @@ -32,13 +32,13 @@ virtualenv with:

.. code-block:: bash
$ virtualenv .env
$ virtualenv .venv
Then activate it to your current tty / terminal session with:

.. code-block:: bash
$ source .env/bin/activate
$ source .venv/bin/activate
Good! Now let's run this:

Expand All @@ -59,7 +59,7 @@ Test Runner

As you seen above, the ``tmuxp`` command will now be available to you,
since you are in the virtual environment, your `PATH` environment was
updated to include a special version of ``python`` inside your ``.env``
updated to include a special version of ``python`` inside your ``.venv``
folder with its own packages.

.. code-block:: bash
Expand Down
10 changes: 5 additions & 5 deletions tmuxp/testsuite/config.py
Expand Up @@ -575,7 +575,7 @@ class ShellCommandBeforeTest(TestCase):
{
'window_name': 'editor',
'start_directory': '~',
'shell_command_before': 'source .env/bin/activate',
'shell_command_before': 'source .venv/bin/activate',
'panes': [
{
'shell_command': ['vim'],
Expand Down Expand Up @@ -626,7 +626,7 @@ class ShellCommandBeforeTest(TestCase):
{
'window_name': 'editor',
'start_directory': os.path.expanduser('~'),
'shell_command_before': ['source .env/bin/activate'],
'shell_command_before': ['source .venv/bin/activate'],
'panes': [
{
'shell_command': ['vim'],
Expand Down Expand Up @@ -680,15 +680,15 @@ class ShellCommandBeforeTest(TestCase):
{
'window_name': 'editor',
'start_directory': os.path.expanduser('~'),
'shell_command_before': ['source .env/bin/activate'],
'shell_command_before': ['source .venv/bin/activate'],
'panes': [
{
'shell_command': ['source .env/bin/activate', 'vim'],
'shell_command': ['source .venv/bin/activate', 'vim'],
},
{
'shell_command_before': ['rbenv local 2.0.0-p0'],
'shell_command': [
'source .env/bin/activate',
'source .venv/bin/activate',
'rbenv local 2.0.0-p0', 'cowsay "hey"'
]
},
Expand Down
2 changes: 1 addition & 1 deletion tmuxp/testsuite/window.py
Expand Up @@ -79,7 +79,7 @@ def test_zfresh_window_data(self):
self.session.attached_window().select_pane(pane_base_index)
self.session.attached_pane().send_keys('cd /srv/www/flaskr')
self.session.attached_window().select_pane(pane_base_index + 1)
self.session.attached_pane().send_keys('source .env/bin/activate')
self.session.attached_pane().send_keys('source .venv/bin/activate')
self.session.new_window(window_name='second')
current_windows += 1
self.assertEqual(current_windows, len(self.session._windows))
Expand Down

0 comments on commit 2c4150a

Please sign in to comment.