forked from mirrors/gecko-dev
Vendoring wheels has three benefits: * There's far less files, so Firefox checkouts will be smaller. * It works around `zipp` not allowing `pip install` from extracted source `tar.gz` files. Now, we should be able to use the pip resolver against vendored packages, which will be needed for future mach virtualenv work. * `./mach vendor python` takes far less time to execute. Since we need the raw Python to be available to add to the `sys.path`, we extract the wheels before putting them in tree. Due to the structure of some wheels being less nested than of a source `tar.gz`, `common_virtualenv_packages` needed to be adjusted accordingly. `install_pip_package()` had to be tweaked as well since you can't `pip install` an extracted wheel. So, we "re-bundle" the wheel before installing from a vendored package. Replace python packages with wheels where possible This contains the vendoring changes caused by the last patch. For reviewing, there's a couple things to note: * A bunch of files are deleted, since there's generally less files in a wheel than in a source archive. * There's a new `.dist-info` directory for each extracted wheel, so expect roughly 5 or 6 new files for each wheel'd package. * There should be no source code changes other than moves from package names changing from having `-` to having `_`. Differential Revision: https://phabricator.services.mozilla.com/D116512
44 lines
1.1 KiB
Python
44 lines
1.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
from ._compat import range_type
|
|
from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
|
|
from .tests import TESTS as DEFAULT_TESTS # noqa: F401
|
|
from .utils import Cycler
|
|
from .utils import generate_lorem_ipsum
|
|
from .utils import Joiner
|
|
from .utils import Namespace
|
|
|
|
# defaults for the parser / lexer
|
|
BLOCK_START_STRING = "{%"
|
|
BLOCK_END_STRING = "%}"
|
|
VARIABLE_START_STRING = "{{"
|
|
VARIABLE_END_STRING = "}}"
|
|
COMMENT_START_STRING = "{#"
|
|
COMMENT_END_STRING = "#}"
|
|
LINE_STATEMENT_PREFIX = None
|
|
LINE_COMMENT_PREFIX = None
|
|
TRIM_BLOCKS = False
|
|
LSTRIP_BLOCKS = False
|
|
NEWLINE_SEQUENCE = "\n"
|
|
KEEP_TRAILING_NEWLINE = False
|
|
|
|
# default filters, tests and namespace
|
|
|
|
DEFAULT_NAMESPACE = {
|
|
"range": range_type,
|
|
"dict": dict,
|
|
"lipsum": generate_lorem_ipsum,
|
|
"cycler": Cycler,
|
|
"joiner": Joiner,
|
|
"namespace": Namespace,
|
|
}
|
|
|
|
# default policies
|
|
DEFAULT_POLICIES = {
|
|
"compiler.ascii_str": True,
|
|
"urlize.rel": "noopener",
|
|
"urlize.target": None,
|
|
"truncate.leeway": 5,
|
|
"json.dumps_function": None,
|
|
"json.dumps_kwargs": {"sort_keys": True},
|
|
"ext.i18n.trimmed": False,
|
|
}
|