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.
- also update requriements "pyflakes" from 0.8 to 0.8.1 due to following issue
```
Traceback (most recent call last):
File "/Users/Askeing/software/servo/python/_virtualenv/bin/servo-tidy", line 5, in <module>
from pkg_resources import load_entry_point
File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3084, in <module>
@_call_aside
File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3070, in _call_aside
f(*args, **kwargs)
File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3097, in
_initialize_master_working_set
working_set = WorkingSet._build_master()
File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 653, in _build_master
return cls._build_from_requirements(__requires__)
File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 666, in
_build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/Users/Askeing/software/servo/python/_virtualenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 839, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pyflakes==0.8.1' distribution was not found and is required by servo-tidy
```
https://github.com/servo/servo/issues/861#issuecomment-209547756
"I think the most important concern is that it's possible to modify tidy.py
and see how those changes affect ./mach test-tidy with the fewest possible
intermediate steps." - jdm
This takes publishing complexity away from the contributor when testing
changes and makes it an infra problem instead, where it's much easier to
automate & saner to manage pypi credentials
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