Skip to content

Commit d8aef7a

Browse files
committed
protobuf: do not use symlinks
1 parent 92719d5 commit d8aef7a

File tree

5 files changed

+35
-43
lines changed

5 files changed

+35
-43
lines changed

releases.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3230,6 +3230,7 @@
32303230
"protoc"
32313231
],
32323232
"versions": [
3233+
"25.2-3",
32333234
"25.2-2",
32343235
"25.2-1",
32353236
"3.21.12-5",

subprojects/packagefiles/protobuf/src/meson.build

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
python = find_program('python3')
33
proto_includes_link = custom_target(
44
'proto_includes_link',
5-
input: files('symlink.py'),
65
output: 'include', # directory adjacent to protoc binary
7-
command: [python, '@INPUT@', meson.current_source_dir(), '@OUTPUT@'],
6+
command: [
7+
python,
8+
files('recursive_copy.py'),
9+
meson.current_source_dir(),
10+
'@OUTPUT@',
11+
],
812
)
913
proto_includes_link_dep = declare_dependency(
1014
sources: proto_includes_link,
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env python3
2+
3+
"""
4+
Helper-script, a replacement to unix `cp -r [source] [destination]` command
5+
should work everywhere where meson does
6+
"""
7+
8+
# This script used to symlink source to destination, but
9+
# creating symlinks in Windows may require administrator
10+
# priviledges or Developer mode enabled.
11+
12+
import sys
13+
import argparse
14+
import shutil
15+
16+
17+
if __name__ == "__main__":
18+
parser = argparse.ArgumentParser()
19+
parser.add_argument('source')
20+
parser.add_argument('destination')
21+
args = parser.parse_args()
22+
23+
try:
24+
shutil.copytree(args.source, args.destination)
25+
except (FileNotFoundError, NotADirectoryError, PermissionError) as exc:
26+
print(exc, file=sys.stderr)
27+
sys.exit(2)

subprojects/packagefiles/protobuf/src/symlink.py

Lines changed: 0 additions & 40 deletions
This file was deleted.

tools/sanity_checks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
'pcreposix.def'
107107
],
108108
'protobuf': [
109-
'symlink.py',
109+
'recursive_copy.py',
110110
],
111111
'sdl2': [
112112
'find-dylib-name.py'

0 commit comments

Comments
 (0)