Commit graph

81 commits

Author SHA1 Message Date
UK992
b9f39cb111 Warn and exit mach if it detects MinGW Python 2016-10-10 18:27:48 +02:00
Ravi Shankar
b579841183 Minor cleanup of mach and bootstrap script 2016-09-01 17:25:36 +05:30
Ravi Shankar
f83fe9e39b Ensure that we get python and pip from virtualenv 2016-09-01 17:00:18 +05:30
J. Ryan Stinnett
3bc2a5632a Allow running WPT in Firefox 2016-07-21 19:31:24 -05:00
bors-servo
e7a55ae55e Auto merge of #10618 - zwn:fix-windows-build, r=larsbergstrom
Ensure virtualenv activates

Fixes #10595. For more info see #10595 or the commit message.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10618)
<!-- Reviewable:end -->
2016-07-17 15:58:12 -07:00
Per Lundberg
22fddac3ad Added detection for case-sensitive file systems
This is needed for the moment because of a bug in virtualenv (reported upstream).
2016-06-14 20:24:06 +03:00
edunham
a1a8e08dca Create mach package
* Split package commands into their own file
* Delete spurious files from build dir
* Create runservo.sh to invoke servo with the right browserhtml incantation
* Tar it all up with the date and time in the filename
2016-06-03 14:47:21 -07:00
Adrian Utrilla
0fff10c7e9
Mach now shows stderr when a virtualenv or pip call fails (fixes #11055) 2016-05-07 17:36:27 +02:00
Corey Farwell
7725e644e9 Upgrade mach to 0.6; stop vendoring mach.
When I originally rewrote Servo's mach bootstrapping (using virtualenv
w/ requirements.txt in #7103), I didn't specify mach as a requirement
because a new version hadn't been published in a while. Now that 0.6
is out, I asked the mach maintainers to publish a new version on PyPI,
so now we can fetch it like the other Python dependencies.

Fixes https://github.com/servo/servo/issues/10728.
2016-05-02 19:27:52 -04:00
Zbynek Winkler
7002fbedd7 Ensure virtualenv activates.
There are two changes:
 * remove quoting which causes virtuaenv not activate
 * check virtualenv actually activated

If the quoting added in the fix in #8394 (4ff8d3ad9c) 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.
2016-04-21 08:23:03 +02:00
askeing
bfe460de9e Package tidy
- Modified the testing commands
- Added the requirements
- Moved python/tidy/tests to python/tidy/servo_tidy_tests for self tidy tests
2016-04-14 15:55:25 +08:00
Petr Klíma
c0bc90d122 Handle exception with errormessage on topdir with Unicode characters.
https://github.com/servo/servo/issues/10002
2016-03-15 11:08:38 +01:00
Suvish Varghese Thoovamalayil
ded08d5fe6 Exit mach with an error when building on a path with spaces. Fixes #9442 2016-02-11 16:28:58 +05:30
Adam Casey
25b0ee22f2 Fix build on windows when default python is MSYS64 python 2016-01-23 15:04:34 +00:00
Jason Williams
13d98f153a adding check for windows then using Scripts instead of bin 2016-01-22 19:27:29 -06:00
Corey Farwell
4ff8d3ad9c Make virtualenv more tolerant of spaces in directory names
Fixes #8390
2015-11-07 11:28:52 -05:00
Benjamin Herr
a4fa004c39 mach_bootstrap: Don't get confused by interrupts
When mach_bootstrap got interrupted while it's setting up virtualenv or
calling out to pip, it wouldn't repeat that step on subsequent runs, and
mach fails because its environment isn't set up properly or dependencies
are missing.

So now we re-run virtualenv if activate_this.py doesn't exist, and only
create the marker file for required packages after pip has returned
successfully.
2015-11-05 21:04:53 +01:00
Corey Farwell
1a9263c2b4 Expand list of Python executable names to search in PATH
Fixes #7784
2015-09-29 18:13:43 -04:00
Anthony Broad-Crawford
2e0e2288ed Added error handling and improved error messaging when running mach without python's virtualenv or pip installed 2015-09-21 13:38:30 -05:00
Aidan Hobson Sayers
9737b2375e Create a marker file to avoid running pip when possible 2015-09-14 20:55:22 +01:00
Corey Farwell
244af42d89 Use OS-agnostic filesystem paths in Python
This will eventually need to be done for #1908
2015-09-08 21:16:02 +02:00
Corey Farwell
31e57cb349 Remove references to no-longer-in-tree Python packages 2015-09-02 09:34:02 -04:00
Corey Farwell
e38df50bbf Revert "Revert "Auto merge of #7103 - frewsxcv:python-venv, r=metajack" for breaking web-platform-tests."
This reverts commit 47d6d958f5.
2015-09-02 09:34:01 -04:00
Ms2ger
47d6d958f5 Revert "Auto merge of #7103 - frewsxcv:python-venv, r=metajack" for breaking web-platform-tests.
This reverts commit c315404db8, reversing
changes made to b00583bd4e.
2015-08-09 11:20:40 +02:00
Corey Farwell
33f78314d9 Use one Python virtual environment for all mach commands
Prior to this commit:

* Our Python dependency story was a bit of a mess. We had complete
 Python packages (wheels and directories) living in-tree, despite
 not having any changes from upstream. This is particularly bad because
 `setup.py` never gets run on these packages which could (sometimes
 silently) unintended breakage.
* Python virtual environments (virtualenv) were only utilized for
 testing web-platform tests

After this commit:

* A single virtualenv (`python/_virtualenv`) is activated upon *every*
 call to mach
* A requirements file (`python/requirements.txt`) is added to describe
 the dependencies needed by Python modules in `python/`. The child
 commit immediately following this will remove all the dependencies
 no longer needed in-tree (for the sake of keeping this commit
 readable).

Relevant to https://github.com/servo/servo/issues/861

Fixes https://github.com/servo/servo/issues/6999
2015-08-08 18:48:02 -04:00
Corey Farwell
848c57653c Add flake8 to the tidy process for Python files
Fixes #6236

Also included in this commit are the changes need to make flake8 pass
for the existing python file
2015-06-04 11:17:34 -04:00
Corey Farwell
e3b71c65bf Fix tidy issues with Python files in python/ 2015-06-02 19:51:41 -04:00
Corey Farwell
372ef7cd5b Clarify Python version checking conditional 2015-05-31 18:34:52 -04:00
James Graham
2bde318d24 Make the test-wpt mach command support all the command line arguments of wptrunner.
Also remove the shell script and ensure that default options are set in a single location
2015-04-03 23:28:51 +01:00
Matthew Rasmus
f0d5083557 mozilla-central modules for debugger detection
Borrows two python modules from mozilla-central to give mach the ability
to detect and pass arguments to a system's preferred debugger.

Links to borrowed files:
http://hg.mozilla.org/mozilla-central/file/c9cfa9b91dea/testing/mozbase/mozinfo/mozinfo/mozinfo.py
http://hg.mozilla.org/mozilla-central/file/c9cfa9b91dea/testing/mozbase/mozdebug/mozdebug/mozdebug.py
2014-11-23 23:21:28 -08:00
Jack Moffitt
c6ab60dbfc Cargoify servo 2014-09-08 20:21:42 -06:00