Skip to content

Make virtualenv more tolerant of spaces in directory names - #8394

Merged
bors-servo merged 1 commit into
servo:masterfrom
frewsxcv:virtualenv-spaces
Nov 8, 2015
Merged

bors-servo merged 1 commit into
servo:masterfrom
frewsxcv:virtualenv-spaces

Conversation

@frewsxcv

@frewsxcv frewsxcv commented Nov 7, 2015

Copy link
Copy Markdown
Contributor

Fixes #8390

Review on Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 7, 2015
@frewsxcv

frewsxcv commented Nov 7, 2015

Copy link
Copy Markdown
Contributor Author

I confirmed this works locally

@Manishearth

Copy link
Copy Markdown
Member

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 4ff8d3a has been approved by Manishearth

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 7, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 4ff8d3a with merge 6e8071f...

bors-servo pushed a commit that referenced this pull request Nov 7, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - gonk

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Nov 7, 2015
@frewsxcv

frewsxcv commented Nov 7, 2015

Copy link
Copy Markdown
Contributor Author

@bors-servo retry

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 4ff8d3a with merge abf2dfe...

bors-servo pushed a commit that referenced this pull request Nov 7, 2015
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Nov 7, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Nov 7, 2015
@frewsxcv

frewsxcv commented Nov 7, 2015

Copy link
Copy Markdown
Contributor Author

@bors-servo retry

yet another buildbot issue

@bors-servo

Copy link
Copy Markdown
Contributor

⚡ Previous build results for android, gonk, linux-dev, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt are reusable. Rebuilding only linux-rel...

@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt

@bors-servo
bors-servo merged commit 4ff8d3a into servo:master Nov 8, 2015
@frewsxcv
frewsxcv deleted the virtualenv-spaces branch November 8, 2015 00:30
@SimonSapin SimonSapin removed the S-tests-failed The changes caused existing tests to fail. label Jan 27, 2016
upsuper pushed a commit to upsuper-forks/servo that referenced this pull request Jul 19, 2016
There are two changes:
 * remove quoting which causes virtuaenv not activate
 * check virtualenv actually activated

If the quoting added in the fix in servo#8394 (4ff8d3a) kicks in, it
causes virtualenv to fail to activate.

For the common case it is no op:
```python
>>> from pipes import quote
>>> print quote('common/case')
common/case
```

When the path actually needs quoting, this is what happens:

```python
>>> print quote('test spaces')
'test spaces'
>>> print quote('windows\\path')
'windows\\path'
```

Note the embedded quotes.

Virtualenv in activate_this.py uses __file__ to build the path that
should be added to PATH:

```python
>>> print os.getcwd()
C:\software\git
>>> print os.path.abspath(quote('windows\\path'))
C:\software\git\'windows\path'
>>>
```

The constructed path is not valid. Adding it at the beginning of PATH
has no effect. This issue affects any case when the call to `quote`
kicks in.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants