servo / stylo

62 stars 15 forks source link

Stylo build is broken when building in a non-servo context #57

Closed nicoburns closed 1 month ago

nicoburns commented 1 month ago

This is the same issue as #55, but #55 only solved the issue for Stylo CI. Using Stylo's main branch as git dependency for example currently fails with "mako not found".

I am open to other solutions, but as a short-term fix to make main non-broken I would be inclined to simply re-add the one-line import that we used to have. I would note that the current state of main is that the vendored python "wheel" is still included in the source-tree. It is just unused as the import has been removed.

The line we would need to reinstate is https://github.com/servo/stylo/commit/4de6af12dd74f9a8808cd5f2ffe34b33d368ee5d

The Gecko patch that removed it https://phabricator.services.mozilla.com/D204532 which also added the entire mako source code in another part of the tree.

mrobinson commented 1 month ago

In a non-Servo context, mako is a dependency for building stylo, right? I don't think you will be able to compile it without installing it somewhere or does the line:

sys.path.insert(0, os.path.join(BASE, "Mako-1.1.2-py2.py3-none-any.whl"))

pull mako from somewhere else?

nicoburns commented 1 month ago

does the line sys.path.insert(0, os.path.join(BASE, "Mako-1.1.2-py2.py3-none-any.whl")) pull mako from somewhere else?

Mako-1.1.2-py2.py3-none-any.whl is a file which currently exists in this git repo (it's still part of the squashed "servo changes" commit even though the import line isn't).

https://github.com/servo/stylo/blob/main/style/properties/Mako-1.1.2-py2.py3-none-any.whl