Skip to content

Commit

Permalink
Fix Error In Some Cases With With Meson Python Not Found
Browse files Browse the repository at this point in the history
In some cases meson does not find python or python for the right arch, fix this by using the projects meson param to specify the python installation currently being used.

https://github.com/wingtk/gvsbuild/blob/acd2a4a9faee3d987cfc36b48fa8e7d7d3e52ec8/gvsbuild/projects/gobject_introspection.py#L64

#1298
  • Loading branch information
doadin committed Mar 28, 2024
1 parent 8d5e456 commit b57412d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions gvsbuild/projects/pycairo.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.

import sys
from pathlib import Path

from gvsbuild.utils.base_builders import Meson
Expand All @@ -33,7 +33,8 @@ def __init__(self):
)

def build(self):
Meson.build(self)
py_dir = Path(sys.executable).parent
Meson.build(self, meson_params=f'-Dpython="{py_dir}\\python.exe"')
cairo_inc = Path(self.builder.gtk_dir) / "include" / "cairo"
self.builder.mod_env("INCLUDE", str(cairo_inc))
self.exec_vs(r"%(python_dir)s\python.exe -m build")
Expand Down
5 changes: 3 additions & 2 deletions gvsbuild/projects/pygobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.

import sys
from pathlib import Path

from gvsbuild.utils.base_builders import Meson
Expand All @@ -38,7 +38,8 @@ def __init__(self):
)

def build(self):
Meson.build(self)
py_dir = Path(sys.executable).parent
Meson.build(self, meson_params=f'-Dpython="{py_dir}\\python.exe"')
gtk_dir = self.builder.gtk_dir
add_inc = [
str(Path(gtk_dir) / "include" / "cairo"),
Expand Down

0 comments on commit b57412d

Please sign in to comment.