@@ -199,6 +199,12 @@ class DpdkSourceInstall(Installer):
199
199
"multi_process/client_server_mp/mp_server" ,
200
200
"multi_process/client_server_mp/mp_client" ,
201
201
]
202
+ _library_bashrc_lines = [
203
+ "export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib64/pkgconfig/" ,
204
+ "export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib64/" ,
205
+ ]
206
+ _meson_arguments : List [str ] = []
207
+ _build_dir : str = "build"
202
208
203
209
def _check_if_installed (self ) -> bool :
204
210
try :
@@ -258,14 +264,15 @@ def get_installed_version(self) -> VersionInfo:
258
264
def _install (self ) -> None :
259
265
super ()._install ()
260
266
if self ._sample_applications :
261
- sample_apps = f"-Dexamples={ ',' .join (self ._sample_applications )} "
262
- else :
263
- sample_apps = ""
267
+ self ._meson_arguments += f"-Dexamples={ ',' .join (self ._sample_applications )} "
268
+
264
269
node = self ._node
265
270
# save the pythonpath for later
266
271
python_path = node .tools [Python ].get_python_path ()
267
272
self .dpdk_build_path = node .tools [Meson ].setup (
268
- args = sample_apps , build_dir = "build" , cwd = self .asset_path
273
+ args = " " .join (self ._meson_arguments ),
274
+ build_dir = self ._build_dir ,
275
+ cwd = self .asset_path ,
269
276
)
270
277
node .tools [Ninja ].run (
271
278
cwd = self .dpdk_build_path ,
@@ -300,12 +307,8 @@ def _install(self) -> None:
300
307
expected_exit_code = 0 ,
301
308
expected_exit_code_failure_message = "ldconfig failed, check for error spew." ,
302
309
)
303
- library_bashrc_lines = [
304
- "export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib64/pkgconfig/" ,
305
- "export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib64/" ,
306
- ]
307
310
node .tools [Echo ].write_to_file (
308
- ";" .join (library_bashrc_lines ),
311
+ ";" .join (self . _library_bashrc_lines ),
309
312
node .get_pure_path ("$HOME/.bashrc" ),
310
313
append = True ,
311
314
)
0 commit comments