Skip to content

Commit a8cdd4c

Browse files
committed
[TASK] build wheel without using some shell
1 parent 53f72f5 commit a8cdd4c

File tree

1 file changed

+13
-18
lines changed

1 file changed

+13
-18
lines changed

bact_archiver/proto/meson.build

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,24 @@ py_gen = generator(protoc,
1313
cpp_generated = cpp_gen.process('epics_event.proto')
1414
py_generated = py_gen.process('epics_event.proto')
1515

16-
# py_proc = custom_target('py_proto',
17-
# command: [ 'cp', '@INPUT@', '@OUTPUT@' ],
18-
# input : py_generated,
19-
# output : 'epics_event_pb2.py',
20-
# build_by_default : true)
21-
message('install dir')
22-
message(py.get_install_dir())
23-
py_proc2 = configure_file(# 'python_proto_as_config',
24-
command: [ 'proto_wrap.sh', '@INPUT@', '@OUTPUT@' ],
25-
# copy : true,
26-
input : 'epics_event.proto',
27-
output : 'epics_event_pb2.py',
28-
install : true,
29-
install_dir: py.get_install_dir() / 'bact_archiver',
30-
install_tag: 'python-runtime',
31-
)
32-
3316
# cython extension
3417
incdir_numpy = run_command(py,
3518
['-c', 'import os; os.chdir(".."); import numpy; print(numpy.get_include())'],
3619
check : true
3720
).stdout().strip()
3821
inc_dir = include_directories(incdir_numpy)
3922

23+
py_gen2 = custom_target('epics_event_build_py',
24+
output: ['epics_event_pb2.py'],
25+
input: 'epics_event.proto',
26+
command: [
27+
protoc, '--proto_path=@SRCDIR@', '--python_out=@OUTDIR@', '@INPUT@'
28+
],
29+
install: true,
30+
install_dir: py.get_install_dir() / 'bact_archiver', # need to install _umfpack.py
31+
install_tag: 'python-runtime',
32+
)
33+
4034
py.extension_module(
4135
'epics_event',
4236
'epics_event.pyx',
@@ -46,4 +40,5 @@ py.extension_module(
4640
subdir: 'bact_archiver',
4741
override_options : ['cython_language=cpp'],
4842
dependencies : protobuf
49-
)
43+
)
44+

0 commit comments

Comments
 (0)