Skip to content

Commit

Permalink
meson: use fs.copyfile everywhere
Browse files Browse the repository at this point in the history
In places where we just copy files to the build dir.
This requires meson 0.64.0
  • Loading branch information
lazka committed Oct 21, 2023
1 parent 125eee1 commit 04dbee9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
6 changes: 1 addition & 5 deletions cairo/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ sources = [
]

foreach python_file : python_sources
configure_file(
input: python_file,
output: python_file,
copy: true,
)
fs.copyfile(python_file, python_file)
endforeach

cairo_dep = dependency('cairo', version: cair_version_req, required: cc.get_id() != 'msvc')
Expand Down
9 changes: 3 additions & 6 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(
'pycairo', 'c',
version: '1.25.1',
meson_version: '>= 0.56.0',
meson_version: '>= 0.64.0',
license: 'LGPL-2.1-only OR MPL-1.1',
default_options: [
'warning_level=1',
Expand All @@ -20,11 +20,8 @@ if not pyver.version_compare(python_version_req)
error('Requires Python @0@'.format(python_version_req))
endif

configure_file(
input: 'setup.cfg',
output: 'setup.cfg',
copy: true,
)
fs = import('fs')
fs.copyfile('setup.cfg', 'setup.cfg')

cc = meson.get_compiler('c')

Expand Down
6 changes: 1 addition & 5 deletions tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ python.extension_module('cmod', mod_sources,
)

foreach python_file : test_sources
configure_file(
input: python_file,
output: python_file,
copy: true,
)
fs.copyfile(python_file, python_file)
endforeach

test(
Expand Down

0 comments on commit 04dbee9

Please sign in to comment.