From a78dda945bc333afa0ed9e9cf3a113a1f18f6f58 Mon Sep 17 00:00:00 2001 From: gichan Date: Wed, 6 Apr 2022 14:15:29 +0900 Subject: [PATCH] [Package] Change package dependency. Previously, the single and pipeline API were separated. Change the pipeline package contain the single package. Signed-off-by: gichan --- c/capi-ml-inference-pipeline.pc.in | 13 ------- c/meson.build | 57 +++++++--------------------- debian/control | 20 ++-------- debian/ml-inference-api-dev.install | 1 + debian/ml-inference-pipeline-api-dev.install | 4 -- debian/ml-inference-pipeline-api.install | 1 - packaging/machine-learning-api.spec | 35 +---------------- tests/capi/meson.build | 2 +- 8 files changed, 20 insertions(+), 113 deletions(-) delete mode 100644 c/capi-ml-inference-pipeline.pc.in delete mode 100644 debian/ml-inference-pipeline-api-dev.install delete mode 100644 debian/ml-inference-pipeline-api.install diff --git a/c/capi-ml-inference-pipeline.pc.in b/c/capi-ml-inference-pipeline.pc.in deleted file mode 100644 index dba045a..0000000 --- a/c/capi-ml-inference-pipeline.pc.in +++ /dev/null @@ -1,13 +0,0 @@ -# Package information for pkg-config - -prefix=@PREFIX@ -exec_prefix=@PREFIX@ -libdir=@LIB_INSTALL_DIR@ -includedir=@INCLUDE_INSTALL_DIR@ - -Name: tizen-api-ml-inference-pipeline -Description: ML inference pipeline API for Tizen -Version: @VERSION@ -Requires: @ML_INFERENCE_PIPE_REQUIRE@ -Libs: -L${libdir} -lcapi-ml-inference-pipeline -Cflags: -I${includedir}/nnstreamer diff --git a/c/meson.build b/c/meson.build index c1a18fd..707d896 100644 --- a/c/meson.build +++ b/c/meson.build @@ -122,29 +122,34 @@ if get_option('default_library') == 'static' endif -# Pipeline API. -nns_capi_pipeline_shared_lib = shared_library ('capi-ml-inference-pipeline', +# Pipeline API. (including single-shot API) +nns_capi_shared_lib = shared_library ('capi-nnstreamer', nns_capi_pipeline_srcs, - dependencies: nns_capi_deps, + dependencies: [nns_capi_deps, nns_capi_single_dep], include_directories: nns_capi_include, install: true, install_dir: api_install_libdir, version: api_version, ) -nns_capi_pipeline_static_lib = static_library ('capi-ml-inference-pipeline', +nns_capi_static_lib = static_library ('capi-nnstreamer', nns_capi_pipeline_srcs, - dependencies: nns_capi_deps, + dependencies: [nns_capi_deps, nns_capi_single_dep], include_directories: nns_capi_include, install: true, install_dir: api_install_libdir, ) -nns_capi_pipeline_dep = declare_dependency(link_with: nns_capi_pipeline_shared_lib) +nns_capi_lib = nns_capi_shared_lib if get_option('default_library') == 'static' - nns_capi_pipeline_dep = declare_dependency(link_with: nns_capi_pipeline_static_lib) + nns_capi_lib = nns_capi_static_lib endif +nns_capi_dep = declare_dependency(link_with: nns_capi_lib, + dependencies: [nns_capi_deps, nns_capi_single_dep], + include_directories: nns_capi_include, +) + # Service API nns_capi_service_shared_lib = shared_library ('capi-ml-service', nns_capi_service_srcs, @@ -168,35 +173,9 @@ if get_option('default_library') == 'static' nns_capi_service_dep = declare_dependency(link_with: nns_capi_service_static_lib) endif -# Single-shot and pipeline API. -nns_capi_shared_lib = shared_library ('capi-nnstreamer', - link_with: [nns_capi_single_shared_lib, nns_capi_pipeline_shared_lib], - include_directories: nns_capi_include, - install: true, - install_dir: api_install_libdir, - version: api_version, -) - -nns_capi_static_lib = static_library ('capi-nnstreamer', - link_whole: [nns_capi_single_static_lib, nns_capi_pipeline_static_lib], - include_directories: nns_capi_include, - install: true, - install_dir: api_install_libdir, -) - -nns_capi_lib = nns_capi_shared_lib -if get_option('default_library') == 'static' - nns_capi_lib = nns_capi_static_lib -endif - -nns_capi_dep = declare_dependency(link_with: nns_capi_lib, - dependencies: [nns_capi_deps,nns_capi_single_dep, nns_capi_pipeline_dep, nns_capi_service_dep], - include_directories: nns_capi_include, -) - ml_inf_conf = configuration_data() ml_inf_conf.merge_from(api_conf) -ml_inf_conf.set('ML_INFERENCE_REQUIRE', 'capi-ml-inference-single capi-ml-inference-pipeline') +ml_inf_conf.set('ML_INFERENCE_REQUIRE', 'capi-ml-inference-single') configure_file(input: 'capi-ml-inference.pc.in', output: 'capi-ml-inference.pc', install_dir: join_paths(api_install_libdir, 'pkgconfig'), configuration: ml_inf_conf @@ -210,17 +189,9 @@ configure_file(input: 'capi-ml-inference-single.pc.in', output: 'capi-ml-inferen configuration: ml_inf_single_conf ) -ml_inf_pipe_conf = configuration_data() -ml_inf_pipe_conf.merge_from(api_conf) -ml_inf_pipe_conf.set('ML_INFERENCE_PIPE_REQUIRE', 'capi-ml-common') -configure_file(input: 'capi-ml-inference-pipeline.pc.in', output: 'capi-ml-inference-pipeline.pc', - install_dir: join_paths(api_install_libdir, 'pkgconfig'), - configuration: ml_inf_pipe_conf -) - ml_inf_service_conf = configuration_data() ml_inf_service_conf.merge_from(api_conf) -ml_inf_service_conf.set('ML_INFERENCE_SERVICE_REQUIRE', 'capi-ml-inference-single capi-ml-inference-pipeline') +ml_inf_service_conf.set('ML_INFERENCE_SERVICE_REQUIRE', 'capi-nnstreamer') configure_file(input: 'capi-ml-service.pc.in', output: 'capi-ml-service.pc', install_dir: join_paths(api_install_libdir, 'pkgconfig'), configuration: ml_inf_service_conf diff --git a/debian/control b/debian/control index 168cb02..8ac8c45 100644 --- a/debian/control +++ b/debian/control @@ -38,24 +38,10 @@ Depends: ml-inference-single-api, ml-api-common-dev, ${shlibs:Depends}, ${misc:D Description: Development package for Machine Learning Inference API This is a development package for Machine Learning Inference Single API. -Package: ml-inference-pipeline-api -Architecture: any -Multi-Arch: same -Depends: nnstreamer, ml-api-common, ${shlibs:Depends}, ${misc:Depends} -Description: Machine Learning Inference Pipeline API - This package provides native API set to easily construct a data stream pipeline with neural networks. - -Package: ml-inference-pipeline-api-dev -Architecture: any -Multi-Arch: same -Depends: ml-inference-pipeline-api, ml-api-common-dev, ${shlibs:Depends}, ${misc:Depends} -Description: Development package for Machine Learning Inference Pipeline API - This is a development package for Machine Learning Inference Pipeline API. - Package: ml-service-api Architecture: any Multi-Arch: same -Depends: ml-inference-single-api, ml-inference-pipeline-api, ${shlibs:Depends}, ${misc:Depends} +Depends: ml-inference-single-api, ${shlibs:Depends}, ${misc:Depends} Description: Machine Learning Service API This package provides native API set to use Machine Learning service. @@ -69,14 +55,14 @@ Description: Development package for Machine Learning Service API Package: ml-inference-api Architecture: any Multi-Arch: same -Depends: ml-inference-single-api, ml-inference-pipeline-api, ${shlibs:Depends}, ${misc:Depends} +Depends: ml-inference-single-api, ${shlibs:Depends}, ${misc:Depends} Description: Machine Learning Inference API This package provides native API set to easily construct a data stream pipeline with neural networks. Package: ml-inference-api-dev Architecture: any Multi-Arch: same -Depends: ml-inference-api, ml-inference-single-api-dev, ml-inference-pipeline-api-dev, ${shlibs:Depends}, ${misc:Depends} +Depends: ml-inference-api, ml-inference-single-api-dev, ${shlibs:Depends}, ${misc:Depends} Description: Development package for Machine Learning Inference API This is a development package for Machine Learning Inference API. diff --git a/debian/ml-inference-api-dev.install b/debian/ml-inference-api-dev.install index a1e7a46..fcaf2e9 100644 --- a/debian/ml-inference-api-dev.install +++ b/debian/ml-inference-api-dev.install @@ -1,3 +1,4 @@ /usr/lib/*/pkgconfig/capi-ml-inference.pc /usr/lib/*/libcapi-nnstreamer.a /usr/lib/*/libcapi-nnstreamer.so +/usr/include/nnstreamer/nnstreamer.h diff --git a/debian/ml-inference-pipeline-api-dev.install b/debian/ml-inference-pipeline-api-dev.install deleted file mode 100644 index 23083c0..0000000 --- a/debian/ml-inference-pipeline-api-dev.install +++ /dev/null @@ -1,4 +0,0 @@ -/usr/include/nnstreamer/nnstreamer.h -/usr/lib/*/pkgconfig/capi-ml-inference-pipeline.pc -/usr/lib/*/libcapi-ml-inference-pipeline.a -/usr/lib/*/libcapi-ml-inference-pipeline.so diff --git a/debian/ml-inference-pipeline-api.install b/debian/ml-inference-pipeline-api.install deleted file mode 100644 index ebeffcc..0000000 --- a/debian/ml-inference-pipeline-api.install +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/*/libcapi-ml-inference-pipeline.so.* diff --git a/packaging/machine-learning-api.spec b/packaging/machine-learning-api.spec index a5f56cb..54e741f 100644 --- a/packaging/machine-learning-api.spec +++ b/packaging/machine-learning-api.spec @@ -65,7 +65,6 @@ Source1001: capi-machine-learning-inference.manifest ## Define build requirements ## Requires: capi-machine-learning-common = %{version}-%{release} Requires: capi-machine-learning-inference-single = %{version}-%{release} -Requires: capi-machine-learning-inference-pipeline = %{version}-%{release} %ifarch aarch64 x86_64 Provides: libcapi-nnstreamer.so(64bit) %else @@ -149,7 +148,6 @@ Group: Machine Learning/ML Framework Requires: capi-machine-learning-inference = %{version}-%{release} Requires: capi-machine-learning-common-devel Requires: capi-machine-learning-inference-single-devel -Requires: capi-machine-learning-inference-pipeline-devel %description devel Developmental kit for Tizen Native NNStreamer API. @@ -203,28 +201,6 @@ Requires: capi-machine-learning-inference-single = %{version}-%{release} %description -n capi-machine-learning-inference-single-devel-static Static library of Tizen Machine Learning Single-shot API. -%package -n capi-machine-learning-inference-pipeline -Summary: Tizen Machine Learning Pipeline API -Group: Machine Learning/ML Framework -Requires: capi-machine-learning-common = %{version}-%{release} -%description -n capi-machine-learning-inference-pipeline -Tizen Machine Learning Pipeline API. - -%package -n capi-machine-learning-inference-pipeline-devel -Summary: pipeline headers for Tizen Machine Learning API -Group: Machine Learning/ML Framework -Requires: capi-machine-learning-inference-pipeline = %{version}-%{release} -Requires: capi-machine-learning-common-devel = %{version}-%{release} -%description -n capi-machine-learning-inference-pipeline-devel -pipeline headers for Tizen Machine Learning API. - -%package -n capi-machine-learning-inference-pipeline-devel-static -Summary: Static library of Tizen Machine Learning Pipeline API -Group: Machine Learning/ML Framework -Requires: capi-machine-learning-inference-pipeline = %{version}-%{release} -%description -n capi-machine-learning-inference-pipeline-devel-static -Static library of Tizen Machine Learning Pipeline API. - %package -n capi-machine-learning-service Summary: Tizen Machine Learning Service API Group: Machine Learning/ML Framework @@ -398,6 +374,7 @@ cp -r result %{buildroot}%{_datadir}/ml-api/unittest/ %files devel %{_libdir}/pkgconfig/capi-ml-inference.pc +%{_includedir}/nnstreamer/nnstreamer.h %files devel-static %{_libdir}/libcapi-nnstreamer.a @@ -412,16 +389,6 @@ cp -r result %{buildroot}%{_datadir}/ml-api/unittest/ %files single-devel-static %{_libdir}/libcapi-ml-inference-single.a -%files pipeline -%{_libdir}/libcapi-ml-inference-pipeline.so* - -%files pipeline-devel -%{_includedir}/nnstreamer/nnstreamer.h -%{_libdir}/pkgconfig/capi-ml-inference-pipeline.pc - -%files pipeline-devel-static -%{_libdir}/libcapi-ml-inference-pipeline.a - %files -n capi-machine-learning-common %{_libdir}/libcapi-ml-common.so* diff --git a/tests/capi/meson.build b/tests/capi/meson.build index 6c7e176..7a339be 100644 --- a/tests/capi/meson.build +++ b/tests/capi/meson.build @@ -46,7 +46,7 @@ test('unittest_capi_datatype_consistency', unittest_capi_datatype_consistency, e unittest_capi_service = executable('unittest_capi_service', 'unittest_capi_service.cc', - dependencies: [unittest_common_dep], + dependencies: [unittest_common_dep, nns_capi_service_dep], install: get_option('install-test'), install_dir: unittest_install_dir ) -- 2.7.4