Skip to content

Commit

Permalink
Merge pull request #1301 from doadin/main
Browse files Browse the repository at this point in the history
Fix Python Not Found with Meson Error
  • Loading branch information
danyeaw committed Mar 28, 2024
2 parents accdba0 + b57412d commit 4c8020d
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 4c8020d

Please sign in to comment.