Error while trying to run "meson build":
Traceback (most recent call last):
File "/usr/share/meson/mesonbuild/mesonmain.py", line 307, in run
app.generate()
File "/usr/share/meson/mesonbuild/mesonmain.py", line 182, in generate
g.generate(intr)
File "/usr/share/meson/mesonbuild/backend/ninjabackend.py", line 194, in generate
self.generate_target(t, outfile)
File "/usr/share/meson/mesonbuild/backend/ninjabackend.py", line 439, in generate_target
obj_list.append(self.generate_single_compile(target, outfile, src, False, [], header_deps))
File "/usr/share/meson/mesonbuild/backend/ninjabackend.py", line 1987, in generate_single_compile
compiler = get_compiler_for_source(target.compilers.values(), src)
File "/usr/share/meson/mesonbuild/mesonlib.py", line 193, in get_compiler_for_source
raise RuntimeError('No specified compiler can handle file {!s}'.format(src))
RuntimeError: No specified compiler can handle file src/Hawk.pyTraceback (most recent call last):
File "/usr/share/meson/mesonbuild/mesonmain.py", line 307, in run
app.generate()
File "/usr/share/meson/mesonbuild/mesonmain.py", line 182, in generate
g.generate(intr)
File "/usr/share/meson/mesonbuild/backend/ninjabackend.py", line 194, in generate
self.generate_target(t, outfile)
File "/usr/share/meson/mesonbuild/backend/ninjabackend.py", line 439, in generate_target
obj_list.append(self.generate_single_compile(target, outfile, src, False, [], header_deps))
File "/usr/share/meson/mesonbuild/backend/ninjabackend.py", line 1987, in generate_single_compile
compiler = get_compiler_for_source(target.compilers.values(), src)
File "/usr/share/meson/mesonbuild/mesonlib.py", line 193, in get_compiler_for_source
raise RuntimeError('No specified compiler can handle file {!s}'.format(src))
RuntimeError: No specified compiler can handle file src/Hawk.py
File meson.build:
project('com.github.project-hawk.hawk',
version : '0.1.0',
license: 'MIT'
)
gnome = import('gnome')
python3 = import('python3')
conf = configuration_data()
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
configure_file(output: 'config.h', configuration: conf)
config_h_dir = include_directories('.')
c_args = [
'-include', 'config.h',
'-DGWEATHER_I_KNOW_THIS_IS_UNSTABLE',
]
subdir('src')
executable('com.github.project-hawk.hawk',
Hawk.py,
c_args: c_args,
dependencies :[
dependency('gtk+-3.0')
],
install : true
)
File Hawk.py:
print("teste meson")
What do you expect the executable() call there to do?
@nirbheek Creates a new executable. The first argument specifies its name and the remaining positional arguments define the input files to use.
@robertsanseries, Python isn't a compiled language, you can just use install_data() on them.
@TingPing Can you give me an example? I'm learning Meson.
Here are a variety of Python projects using Meson:
@TingPing thank you so much! resolved!
Most helpful comment
Here are a variety of Python projects using Meson: