Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meson: use finalize method #25319

Merged
merged 7 commits into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion recipes/meson/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import textwrap

from conan import ConanFile, conan_version
from conan.tools.files import copy, get, rmdir, save
from conan.tools.files import copy, get, rmdir, save, replace_in_file
from conan.tools.layout import basic_layout
from conan.tools.scm import Version

Expand Down Expand Up @@ -52,6 +52,16 @@ def package(self):
exec "$meson_dir/meson.py" "$@"
"""))

def finalize(self):
copy(self, "*", src=self.immutable_package_folder, dst=self.package_folder)
replace_in_file(self, os.path.join(self.package_folder, "bin", "meson.cmd"),
"set PYTHONDONTWRITEBYTECODE=1",
"")

replace_in_file(self, os.path.join(self.package_folder, "bin", "meson"),
"export PYTHONDONTWRITEBYTECODE=1",
"")

@staticmethod
def _chmod_plus_x(filename):
if os.name == "posix":
Expand Down
Loading