mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
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
This commit is contained in:
parent
b91320cb05
commit
33f78314d9
5 changed files with 51 additions and 51 deletions
|
@ -19,11 +19,6 @@ from licenseck import licenses
|
|||
filetypes_to_check = [".rs", ".rc", ".cpp", ".c", ".h", ".py", ".toml", ".webidl"]
|
||||
reftest_directories = ["tests/ref"]
|
||||
reftest_filetype = ".list"
|
||||
python_dependencies = [
|
||||
"./python/dependencies/flake8-2.4.1-py2.py3-none-any.whl",
|
||||
"./python/dependencies/pep8-1.5.7-py2.py3-none-any.whl",
|
||||
"./python/dependencies/pyflakes-0.9.0-py2.py3-none-any.whl",
|
||||
]
|
||||
|
||||
ignored_files = [
|
||||
# Upstream
|
||||
|
@ -36,6 +31,7 @@ ignored_files = [
|
|||
"python/toml/*",
|
||||
"components/script/dom/bindings/codegen/parser/*",
|
||||
"components/script/dom/bindings/codegen/ply/*",
|
||||
"python/_virtualenv/*",
|
||||
|
||||
# Generated and upstream code combined with our own. Could use cleanup
|
||||
"target/*",
|
||||
|
@ -272,8 +268,6 @@ def get_reftest_names(line):
|
|||
|
||||
|
||||
def scan():
|
||||
sys.path += python_dependencies
|
||||
|
||||
all_files = collect_file_names()
|
||||
files_to_check = filter(should_check, all_files)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue