[webkit-dev] Moving to Python 3

Michael Catanzaro mcatanzaro at igalia.com
Sun Jul 14 06:37:26 PDT 2019


On Sat, Jul 13, 2019 at 9:26 PM, Maciej Stachowiak <mjs at apple.com> 
wrote:
> Can you clarify why this is needed?

Well it just wouldn't seem very kosher to use a virtualenv for the 
serious work of performing real distro builds, right? In contrast to 
developer scripts for developer convenience, where I'd say it's 
perfectly fine to do whatever we want. But official builds should 
surely be performed using system dependencies only.

Anyway, it doesn't seem like a problem. From searching for 'python' in 
my build.ninja, I find:

JSC:

ud_itab.py
generateWasmOpsHeader.py
generateWasmValidateInlinesHeader.py
generateWasmB3IRGeneratorInlinesHeader.py
create_regex_tables
generateYarrUnicodePropertyTables.py
generateIntlCanonicalizeLanguage.py
KeywordLookupGenerator.py
generate-inspector-protocol-bindings.py
generate-js-builtins.py
generateYarrCanonicalizeUnicode
generate-combined-inspector-json.py
jsmin.py
cssmin.py
make-js-file-arrays.py

WebCore:

create-html-entity-table
create-http-header-name-table
makeSelectorPseudoClassAndCompatibilityElementMap.py
makeSelectorPseudoElementsMap.py

WebKit:

generate-message-receiver.py
generate-messages-header.py

WebInspectorUI:

copy-user-interface-resources.pl (perl script that runs some python)

Tools:

generate-inspector-gresource-manifest.py

It's possible I've missed some, but that's probably most of them. 
Basically all the scripts under Source/ -- the scripts that are really 
required to build -- and that one platform-specific exception under 
Tools/, shouldn't require a virtualenv IMO. That doesn't seem too 
difficult to ensure. We could either have them use the virtualenv only 
optionally if it's somehow already available (I'm not familiar with how 
it works) or only if the scripts detect that webkitpy exists, or just 
make this subset of scripts compatible with both python2 and python3 
for the next couple years.

In contrast, the vast majority of our python scripts are not required 
to build. They live under Tools/Scripts, are only used by developers, 
and are not included in release tarballs at all. That includes all of 
webkitpy, anything used by build-webkit, anything used by 
run-webkit-tests, etc. I'd say we can go crazy here. You get a 
virtualenv, you get a virtualenv, everybody gets a virtualenv!

Michael




More information about the webkit-dev mailing list