Support python 3.9.1 44/251244/2
authorjay.ho.park <jay.ho.park@samsung.com>
Tue, 12 Jan 2021 20:14:31 +0000 (05:14 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 12 Jan 2021 03:06:51 +0000 (12:06 +0900)
Change-Id: Ie1981b4d8982484efa18fc3717543ad52164fe8d

nlp_resource_data/CMakeLists.txt
packaging/nlp.spec
service/CMakeLists.txt
service/src/service.c
tests/CMakeLists.txt

index fe943f6..f3269f4 100755 (executable)
@@ -6,6 +6,6 @@ PROJECT(${fw_name} C)
 
 INCLUDE(FindPkgConfig)
 
-INSTALL(DIRECTORY nltk DESTINATION ${LIBDIR}/python3.7/site-packages)
-INSTALL(DIRECTORY langdetect DESTINATION ${LIBDIR}/python3.7/site-packages)
+INSTALL(DIRECTORY nltk DESTINATION ${LIBDIR}/python3.9/site-packages)
+INSTALL(DIRECTORY langdetect DESTINATION ${LIBDIR}/python3.9/site-packages)
 INSTALL(DIRECTORY nltk_data DESTINATION /usr/local/lib/)
index 0798aad..db7ecfa 100755 (executable)
@@ -12,7 +12,7 @@ BuildRequires: pkgconfig(capi-appfw-service-application)
 BuildRequires: pkgconfig(libtzplatform-config)
 BuildRequires: pkgconfig(bundle)
 BuildRequires: python3-base
-BuildRequires: pkgconfig(python3)
+BuildRequires: pkgconfig(python3-embed)
 BuildRequires: pkgconfig(glib-2.0)
 BuildRequires: pkgconfig(rpc-port)
 BuildRequires: pkgconfig(ecore)
@@ -76,8 +76,8 @@ tpk-backend -d %{name} --preload --force-remove
 %attr(755,root,root) %{_app_bin_dir}/org.tizen.nlp.service
 %{_app_bin_dir}/*
 %{TZ_SYS_RO_PACKAGES}/org.tizen.nlp.service.xml
-%{_libdir}/python3.7/site-packages/langdetect/*
-%{_libdir}/python3.7/site-packages/nltk/*
+%{python3_sitelib}/langdetect/*
+%{python3_sitelib}/nltk/*
 %license LICENSE
 
 %files data-en
index bfc5fac..5de12b2 100755 (executable)
@@ -27,7 +27,7 @@ pkg_check_modules(pkgs REQUIRED
         capi-base-common
         capi-appfw-service-application
         bundle
-        python3
+        python3-embed
         glib-2.0
         rpc-port
         ecore
index 743df37..9759126 100755 (executable)
@@ -563,7 +563,7 @@ PyObject* nltk_get_module(const char* name)
 
 int nltk_get_size_from_list(PyObject* list)
 {
-    if PyList_Check(list)
+    if (PyList_Check(list))
     {
         return PyList_Size(list);
     }
@@ -575,7 +575,7 @@ int nltk_get_size_from_list(PyObject* list)
 
 int nltk_get_size_from_tuple(PyObject* tuple)
 {
-    if PyTuple_Check(tuple)
+    if (PyTuple_Check(tuple))
     {
         return PyTuple_Size(tuple);
     }
@@ -588,7 +588,7 @@ int nltk_get_size_from_tuple(PyObject* tuple)
 PyObject* nltk_get_element_from_list_by_index(PyObject* list, int index)
 {
     PyObject* element;
-    if PyList_Check(list)
+    if (PyList_Check(list))
     {
         if (index > (PyList_Size(list)-1) || (index < 0 ))
         {
@@ -611,7 +611,7 @@ PyObject* nltk_get_element_from_tuple_by_index(PyObject* tuple, int index)
 {
     PRET_VM(!tuple, NULL, "Input parameter [tuple] is NULL!");
     PyObject* element;
-    if PyTuple_Check(tuple)
+    if (PyTuple_Check(tuple))
     {
         if (index > (PyTuple_Size(tuple)-1) || (index < 0 ))
         {
index 2a3e630..3e4d5b5 100644 (file)
@@ -7,7 +7,7 @@ pkg_check_modules(pkgs REQUIRED
        capi-base-common
        capi-appfw-service-application
        bundle
-       python3
+       python3-embed
        glib-2.0
        rpc-port
        ecore