Closed jstkdng closed 3 years ago
Maybe it's not python version? Fedora 33 has python 3.9 and rpm builds fine. I didn't find any patch modifing preprocess_grit.py
too.
I think those scripts were meant to run in python2 instead of just python. In arch the python binary defaults to 3.9 so it is failing. Might need a patch for that or a sed oneliner, like on arch's PKGBUILD.
# Force script incompatible with Python 3 to use /usr/bin/python2
sed -i '1s|python$|&2|' third_party/dom_distiller_js/protoc_plugins/*.py
Yeah you are right. In the fedora build file there is this line
find -type f -exec sed -iE '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!%{__python2}=' {} +
so it basically forces every script to use python2.
that works for standalone scripts that have a shebang, but most stuff is run by ninja and ninja is using python and not python2
If it's getting complicated with python versions and I do not want to deal with it I usually just create a virtualenv
/conda
environment. It almost always works.
How funny, I was just testing that, great minds think alike it seems. It's much easier to create a virtualenv than to use a ubuntu container. If that works I'll close this issue. Using a venv for distros that have python pointing to python3 should be on the docs tbh.
alright, build finished without a problem.
Could be a problem since arch has python 3.9 and not 3.5