Skip to contentSkip to conversation

Export python packages installed using pypi to target

DISCUSSION Ashu Joshi 2 participants 15 messages Mar 21, 2024 – Mar 28, 2024 1 message not in the archive

lore
Share & tools
lore

Ashu Joshi

author
#0 lore raw

Hello,
I am trying to install wirpas_gateway package from pypi using yocto recipe.. Once service is build completely and  I flash image to target, i don't see any of the installed packages. Does anyone has nay reference how to install these packages in target as well. I dont see any generated binary which i can ship tp target. However, source code of the package can be seen in work directory. Currently I am trying to do something like below:

do_install() {
install -m 0755 -d ${D}${sysconfdir}/systemd/system
install -m 0755 ${WORKDIR}/wirepasTransport.service ${D}${sysconfdir}/systemd/system

install -m 0755 -d ${D}/usr/share
install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

install -m 0755 -d ${D}/usr/share/wirepas_gateway
install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3 ${D}/usr/share/wirepas_gateway }

FILES_${PN} += "usr/share/wirepas_gateway"
FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

wirepas_gateway-1.4.3 is directory which contains setup and other files. Getting error while trying to ship this to target.

#1 lore raw

Please share your complete recipe and all of the error message, otherwise it’s impossible to tell what is happening.

Alex

Quoted 41 lines · Ashu Joshi

Hello,
I am trying to install wirpas_gateway package from pypi using yocto recipe.. Once service is build completely and I flash image to target, i don't see any of the installed packages. Does anyone has nay reference how to install these packages in target as well. I dont see any generated binary which i can ship tp target. However, source code of the package can be seen in work directory. Currently I am trying to do something like below:

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

      install -m 0755 -d ${D}/usr/share/wirepas_gateway
      install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3

${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

wirepas_gateway-1.4.3 is directory which contains setup and other files. Getting error while trying to ship this to target.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#62809):
https://lists.yoctoproject.org/g/yocto/message/62809
Mute This Topic: https://lists.yoctoproject.org/mt/105061124/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#2 lore raw

Entire recipe is:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
DESCRIPTION = "Wirepas gateway transport service that connects the local dbus to a remote MQTT broker"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cb6bb17b0d0cca188339074207e9f4d8"

SRC_URI = "file://wirepasTransport.service \
           file://settings.yml \

"

PYPI_PACKAGE = "wirepas_gateway"
PV = "1.4.3"
inherit pypi pkgconfig setuptools3

SRC_URI[md5sum] = "941a4407513445c64f16b57a1474fc43"

DEPENDS += "systemd python3 python3-pkgconfig-native python3-pip"

SYSTEMD_SERVICE_${PN} = "wirepasTransport.service" SYSTEMD_AUTO_ENABLE_${PN} = "enable"

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

# install -m 0755 -d ${D}/usr/share/wirepas_gateway
# install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3
${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
#FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

Error was basically because of commented code wherein I was trying to export the entire directory. I have commented out that for now.. I found that by creating rpm or opkg package we can export the package to target. Need help around that, if that is the correct way and how to use this method in yocto recipe. If not, what can be the other way using which we can ship or install the package in target.

Quoted 48 lines · Alexander Kanavin

Please share your complete recipe and all of the error message, otherwise it’s impossible to tell what is happening.

Alex

Quoted 41 lines · Ashu Joshi

Hello,
I am trying to install wirpas_gateway package from pypi using yocto recipe.. Once service is build completely and I flash image to target, i don't see any of the installed packages. Does anyone has nay reference how to install these packages in target as well. I dont see any generated binary which i can ship tp target. However, source code of the package can be seen in work directory. Currently I am trying to do something like below:

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

      install -m 0755 -d ${D}/usr/share/wirepas_gateway
      install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3

${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

wirepas_gateway-1.4.3 is directory which contains setup and other files. Getting error while trying to ship this to target.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#62809):
https://lists.yoctoproject.org/g/yocto/message/62809
Mute This Topic: https://lists.yoctoproject.org/mt/105061124/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#3 lore raw

It seems I have been able to install the package in gateway but getting some encoding related error. Below is the error:

~ $ wm-gw --help
Python path configuration:
PYTHONHOME = '/'
PYTHONPATH = (not set)
program name = 'python3'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/usr/bin/python3'
sys.base_prefix = '/'
sys.base_exec_prefix = '/'
sys.executable = '/usr/bin/python3'
sys.prefix = '/'
sys.exec_prefix = '/'
sys.path = [

    'lib/python38.zip',
    '/lib/python3.8',
    '/lib/python3.8/lib-dynload',

]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

I even tried to unset PYTHONHOME and PYTHONPATH by adding below in the recipe file but still encountering the same error. Any idea how to fix this?

do_configure(){
unset PYTHONPATH
unset PYTHONHOME
}

Quoted 99 lines · Ashu Joshi

Entire recipe is:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
DESCRIPTION = "Wirepas gateway transport service that connects the local dbus to a remote MQTT broker"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cb6bb17b0d0cca188339074207e9f4d8"

SRC_URI = "file://wirepasTransport.service \
           file://settings.yml \

"

PYPI_PACKAGE = "wirepas_gateway"
PV = "1.4.3"
inherit pypi pkgconfig setuptools3

SRC_URI[md5sum] = "941a4407513445c64f16b57a1474fc43"

DEPENDS += "systemd python3 python3-pkgconfig-native python3-pip"

SYSTEMD_SERVICE_${PN} = "wirepasTransport.service" SYSTEMD_AUTO_ENABLE_${PN} = "enable"

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

# install -m 0755 -d ${D}/usr/share/wirepas_gateway
# install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3
${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
#FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

Error was basically because of commented code wherein I was trying to export the entire directory. I have commented out that for now.. I found that by creating rpm or opkg package we can export the package to target. Need help around that, if that is the correct way and how to use this method in yocto recipe. If not, what can be the other way using which we can ship or install the package in target.

Quoted 48 lines · Alexander Kanavin

Please share your complete recipe and all of the error message, otherwise it’s impossible to tell what is happening.

Alex

Quoted 41 lines · Ashu Joshi

Hello,
I am trying to install wirpas_gateway package from pypi using yocto recipe.. Once service is build completely and I flash image to target, i don't see any of the installed packages. Does anyone has nay reference how to install these packages in target as well. I dont see any generated binary which i can ship tp target. However, source code of the package can be seen in work directory. Currently I am trying to do something like below:

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

      install -m 0755 -d ${D}/usr/share/wirepas_gateway
      install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3

${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

wirepas_gateway-1.4.3 is directory which contains setup and other files. Getting error while trying to ship this to target.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#62809):
https://lists.yoctoproject.org/g/yocto/message/62809
Mute This Topic: https://lists.yoctoproject.org/mt/105061124/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#4 lore raw

It's a little odd that the application is looking for python modules in /lib and not /usr/lib.

If you run python3 on the target and issue 'import encodings', does that work? Then they are installed in /usr/lib, and you need to find out why the app redirects python to look elsewhere.

Alex

Quoted 139 lines · Ashu Joshi

It seems I have been able to install the package in gateway but getting some encoding related error. Below is the error:

~ $ wm-gw --help
Python path configuration:
PYTHONHOME = '/'
PYTHONPATH = (not set)
program name = 'python3'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/usr/bin/python3'
sys.base_prefix = '/'
sys.base_exec_prefix = '/'
sys.executable = '/usr/bin/python3'
sys.prefix = '/'
sys.exec_prefix = '/'
sys.path = [

    'lib/python38.zip',
    '/lib/python3.8',
    '/lib/python3.8/lib-dynload',

]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

I even tried to unset PYTHONHOME and PYTHONPATH by adding below in the recipe file but still encountering the same error. Any idea how to fix this?

do_configure(){
unset PYTHONPATH
unset PYTHONHOME
}

Quoted 99 lines · Ashu Joshi

Entire recipe is:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
DESCRIPTION = "Wirepas gateway transport service that connects the local dbus to a remote MQTT broker"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cb6bb17b0d0cca188339074207e9f4d8"

SRC_URI = "file://wirepasTransport.service \
           file://settings.yml \

"

PYPI_PACKAGE = "wirepas_gateway"
PV = "1.4.3"
inherit pypi pkgconfig setuptools3

SRC_URI[md5sum] = "941a4407513445c64f16b57a1474fc43"

DEPENDS += "systemd python3 python3-pkgconfig-native python3-pip"

SYSTEMD_SERVICE_${PN} = "wirepasTransport.service" SYSTEMD_AUTO_ENABLE_${PN} = "enable"

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

# install -m 0755 -d ${D}/usr/share/wirepas_gateway
# install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3
${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
#FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

Error was basically because of commented code wherein I was trying to export the entire directory. I have commented out that for now.. I found that by creating rpm or opkg package we can export the package to target. Need help around that, if that is the correct way and how to use this method in yocto recipe. If not, what can be the other way using which we can ship or install the package in target.

Quoted 48 lines · Alexander Kanavin

Please share your complete recipe and all of the error message, otherwise it’s impossible to tell what is happening.

Alex

Quoted 41 lines · Ashu Joshi

Hello,
I am trying to install wirpas_gateway package from pypi using yocto recipe.. Once service is build completely and I flash image to target, i don't see any of the installed packages. Does anyone has nay reference how to install these packages in target as well. I dont see any generated binary which i can ship tp target. However, source code of the package can be seen in work directory. Currently I am trying to do something like below:

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

      install -m 0755 -d ${D}/usr/share/wirepas_gateway
      install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3

${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

wirepas_gateway-1.4.3 is directory which contains setup and other files. Getting error while trying to ship this to target.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#62809):
https://lists.yoctoproject.org/g/yocto/message/62809
Mute This Topic: https://lists.yoctoproject.org/mt/105061124/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#5 lore raw

It doesn't allow me to run import encodings as it is giving another error import:not found

Quoted 150 lines · Alexander Kanavin

It's a little odd that the application is looking for python modules in /lib and not /usr/lib.

If you run python3 on the target and issue 'import encodings', does that work? Then they are installed in /usr/lib, and you need to find out why the app redirects python to look elsewhere.

Alex

Quoted 139 lines · Ashu Joshi

It seems I have been able to install the package in gateway but getting some encoding related error. Below is the error:

~ $ wm-gw --help
Python path configuration:
PYTHONHOME = '/'
PYTHONPATH = (not set)
program name = 'python3'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/usr/bin/python3'
sys.base_prefix = '/'
sys.base_exec_prefix = '/'
sys.executable = '/usr/bin/python3'
sys.prefix = '/'
sys.exec_prefix = '/'
sys.path = [

    'lib/python38.zip',
    '/lib/python3.8',
    '/lib/python3.8/lib-dynload',

]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

I even tried to unset PYTHONHOME and PYTHONPATH by adding below in the recipe file but still encountering the same error. Any idea how to fix this?

do_configure(){
unset PYTHONPATH
unset PYTHONHOME
}

Quoted 99 lines · Ashu Joshi

Entire recipe is:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
DESCRIPTION = "Wirepas gateway transport service that connects the local dbus to a remote MQTT broker"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cb6bb17b0d0cca188339074207e9f4d8"

SRC_URI = "file://wirepasTransport.service \
           file://settings.yml \

"

PYPI_PACKAGE = "wirepas_gateway"
PV = "1.4.3"
inherit pypi pkgconfig setuptools3

SRC_URI[md5sum] = "941a4407513445c64f16b57a1474fc43"

DEPENDS += "systemd python3 python3-pkgconfig-native python3-pip"

SYSTEMD_SERVICE_${PN} = "wirepasTransport.service" SYSTEMD_AUTO_ENABLE_${PN} = "enable"

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

# install -m 0755 -d ${D}/usr/share/wirepas_gateway
# install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3
${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
#FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

Error was basically because of commented code wherein I was trying to export the entire directory. I have commented out that for now.. I found that by creating rpm or opkg package we can export the package to target. Need help around that, if that is the correct way and how to use this method in yocto recipe. If not, what can be the other way using which we can ship or install the package in target.

Quoted 48 lines · Alexander Kanavin

Please share your complete recipe and all of the error message, otherwise it’s impossible to tell what is happening.

Alex

Quoted 41 lines · Ashu Joshi

Hello,
I am trying to install wirpas_gateway package from pypi using yocto recipe.. Once service is build completely and I flash image to target, i don't see any of the installed packages. Does anyone has nay reference how to install these packages in target as well. I dont see any generated binary which i can ship tp target. However, source code of the package can be seen in work directory. Currently I am trying to do something like below:

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

      install -m 0755 -d ${D}/usr/share/wirepas_gateway
      install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3

${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

wirepas_gateway-1.4.3 is directory which contains setup and other files. Getting error while trying to ship this to target.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#62809):
https://lists.yoctoproject.org/g/yocto/message/62809
Mute This Topic: https://lists.yoctoproject.org/mt/105061124/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#6 lore raw

You need to first start python3 and run it there, not directly from the shell.

Alex

Quoted 157 lines · Ashu Joshi

It doesn't allow me to run import encodings as it is giving another error import:not found

Quoted 151 lines · Alexander Kanavin

It's a little odd that the application is looking for python modules in /lib and not /usr/lib.

If you run python3 on the target and issue 'import encodings', does that work? Then they are installed in /usr/lib, and you need to find out why the app redirects python to look elsewhere.

Alex

Quoted 140 lines · Ashu Joshi

It seems I have been able to install the package in gateway but getting some encoding related error. Below is the error:

~ $ wm-gw --help
Python path configuration:
PYTHONHOME = '/'
PYTHONPATH = (not set)
program name = 'python3'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/usr/bin/python3'
sys.base_prefix = '/'
sys.base_exec_prefix = '/'
sys.executable = '/usr/bin/python3'
sys.prefix = '/'
sys.exec_prefix = '/'
sys.path = [

    'lib/python38.zip',
    '/lib/python3.8',
    '/lib/python3.8/lib-dynload',

]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

I even tried to unset PYTHONHOME and PYTHONPATH by adding below in the recipe file but still encountering the same error. Any idea how to fix this?

do_configure(){
unset PYTHONPATH
unset PYTHONHOME
}

Quoted 99 lines · Ashu Joshi

Entire recipe is:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
DESCRIPTION = "Wirepas gateway transport service that connects the local dbus to a remote MQTT broker"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cb6bb17b0d0cca188339074207e9f4d8"

SRC_URI = "file://wirepasTransport.service \
           file://settings.yml \

"

PYPI_PACKAGE = "wirepas_gateway"
PV = "1.4.3"
inherit pypi pkgconfig setuptools3

SRC_URI[md5sum] = "941a4407513445c64f16b57a1474fc43"

DEPENDS += "systemd python3 python3-pkgconfig-native python3-pip"

SYSTEMD_SERVICE_${PN} = "wirepasTransport.service" SYSTEMD_AUTO_ENABLE_${PN} = "enable"

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

# install -m 0755 -d ${D}/usr/share/wirepas_gateway
# install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3
${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
#FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

Error was basically because of commented code wherein I was trying to export the entire directory. I have commented out that for now.. I found that by creating rpm or opkg package we can export the package to target. Need help around that, if that is the correct way and how to use this method in yocto recipe. If not, what can be the other way using which we can ship or install the package in target.

Quoted 48 lines · Alexander Kanavin

Please share your complete recipe and all of the error message, otherwise it’s impossible to tell what is happening.

Alex

Quoted 41 lines · Ashu Joshi

Hello,
I am trying to install wirpas_gateway package from pypi using yocto recipe.. Once service is build completely and I flash image to target, i don't see any of the installed packages. Does anyone has nay reference how to install these packages in target as well. I dont see any generated binary which i can ship tp target. However, source code of the package can be seen in work directory. Currently I am trying to do something like below:

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

      install -m 0755 -d ${D}/usr/share/wirepas_gateway
      install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3

${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

wirepas_gateway-1.4.3 is directory which contains setup and other files. Getting error while trying to ship this to target.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#62809):
https://lists.yoctoproject.org/g/yocto/message/62809
Mute This Topic: https://lists.yoctoproject.org/mt/105061124/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#7 lore raw

How do i start python3 because when i try to start python by writing python3 in target's terminal, i get above error message related to encodings.

Quoted 168 lines · Alexander Kanavin

You need to first start python3 and run it there, not directly from the shell.

Alex

Quoted 161 lines · Ashu Joshi

It doesn't allow me to run import encodings as it is giving another error import:not found

Quoted 155 lines · Alexander Kanavin

It's a little odd that the application is looking for python modules in /lib and not /usr/lib.

If you run python3 on the target and issue 'import encodings', does that work? Then they are installed in /usr/lib, and you need to find out why the app redirects python to look elsewhere.

Alex

Quoted 144 lines · Ashu Joshi

It seems I have been able to install the package in gateway but getting some encoding related error. Below is the error:

~ $ wm-gw --help
Python path configuration:
PYTHONHOME = '/'
PYTHONPATH = (not set)
program name = 'python3'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/usr/bin/python3'
sys.base_prefix = '/'
sys.base_exec_prefix = '/'
sys.executable = '/usr/bin/python3'
sys.prefix = '/'
sys.exec_prefix = '/'
sys.path = [

    'lib/python38.zip',
    '/lib/python3.8',
    '/lib/python3.8/lib-dynload',

]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

I even tried to unset PYTHONHOME and PYTHONPATH by adding below in the recipe file but still encountering the same error. Any idea how to fix this?

do_configure(){
unset PYTHONPATH
unset PYTHONHOME
}

Quoted 102 lines · Ashu Joshi

Entire recipe is:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:" DESCRIPTION = "Wirepas gateway transport service that connects the local dbus to a remote MQTT broker"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cb6bb17b0d0cca188339074207e9f4d8"

SRC_URI = "file://wirepasTransport.service \
           file://settings.yml \

"

PYPI_PACKAGE = "wirepas_gateway"
PV = "1.4.3"
inherit pypi pkgconfig setuptools3

SRC_URI[md5sum] = "941a4407513445c64f16b57a1474fc43"

DEPENDS += "systemd python3 python3-pkgconfig-native python3-pip"

SYSTEMD_SERVICE_${PN} = "wirepasTransport.service" SYSTEMD_AUTO_ENABLE_${PN} = "enable"

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

# install -m 0755 -d ${D}/usr/share/wirepas_gateway
# install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3
${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
#FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

Error was basically because of commented code wherein I was trying to export the entire directory. I have commented out that for now.. I found that by creating rpm or opkg package we can export the package to target. Need help around that, if that is the correct way and how to use this method in yocto recipe. If not, what can be the other way using which we can ship or install the package in target.

Quoted 50 lines · Alexander Kanavin

Please share your complete recipe and all of the error message, otherwise it’s impossible to tell what is happening.

Alex

Quoted 42 lines · Ashu Joshi

Hello,
I am trying to install wirpas_gateway package from pypi using yocto recipe.. Once service is build completely and I flash image to target, i don't see any of the installed packages. Does anyone has nay reference how to install these packages in target as well. I dont see any generated binary which i can ship tp target. However, source code of the package can be seen in work directory. Currently I am trying to do something like below:

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

      install -m 0755 -d ${D}/usr/share/wirepas_gateway
      install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3

${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

wirepas_gateway-1.4.3 is directory which contains setup and other files. Getting error while trying to ship this to target.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#62809):
https://lists.yoctoproject.org/g/yocto/message/62809
Mute This Topic: https://lists.yoctoproject.org/mt/105061124/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#8 lore raw

This means the python installation on the target is incomplete/broken. You need to look into how the image was formed because encodings module is included in the core python package and is normally always present.

Alex

Quoted 176 lines · Ashu Joshi

How do i start python3 because when i try to start python by writing python3 in target's terminal, i get above error message related to encodings.

Quoted 169 lines · Alexander Kanavin

You need to first start python3 and run it there, not directly from the shell.

Alex

Quoted 162 lines · Ashu Joshi

It doesn't allow me to run import encodings as it is giving another error import:not found

Quoted 156 lines · Alexander Kanavin

It's a little odd that the application is looking for python modules in /lib and not /usr/lib.

If you run python3 on the target and issue 'import encodings', does that work? Then they are installed in /usr/lib, and you need to find out why the app redirects python to look elsewhere.

Alex

Quoted 145 lines · Ashu Joshi

It seems I have been able to install the package in gateway but getting some encoding related error. Below is the error:

~ $ wm-gw --help
Python path configuration:
PYTHONHOME = '/'
PYTHONPATH = (not set)
program name = 'python3'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/usr/bin/python3'
sys.base_prefix = '/'
sys.base_exec_prefix = '/'
sys.executable = '/usr/bin/python3'
sys.prefix = '/'
sys.exec_prefix = '/'
sys.path = [

    'lib/python38.zip',
    '/lib/python3.8',
    '/lib/python3.8/lib-dynload',

]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

I even tried to unset PYTHONHOME and PYTHONPATH by adding below in the recipe file but still encountering the same error. Any idea how to fix this?

do_configure(){
unset PYTHONPATH
unset PYTHONHOME
}

Quoted 103 lines · Ashu Joshi

Entire recipe is:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:" DESCRIPTION = "Wirepas gateway transport service that connects the local dbus to a remote MQTT broker"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cb6bb17b0d0cca188339074207e9f4d8"

SRC_URI = "file://wirepasTransport.service \
           file://settings.yml \

"

PYPI_PACKAGE = "wirepas_gateway"
PV = "1.4.3"
inherit pypi pkgconfig setuptools3

SRC_URI[md5sum] = "941a4407513445c64f16b57a1474fc43"

DEPENDS += "systemd python3 python3-pkgconfig-native python3-pip"

SYSTEMD_SERVICE_${PN} = "wirepasTransport.service" SYSTEMD_AUTO_ENABLE_${PN} = "enable"

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

# install -m 0755 -d ${D}/usr/share/wirepas_gateway
# install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3
${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
#FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

Error was basically because of commented code wherein I was trying to export the entire directory. I have commented out that for now.. I found that by creating rpm or opkg package we can export the package to target. Need help around that, if that is the correct way and how to use this method in yocto recipe. If not, what can be the other way using which we can ship or install the package in target.

Quoted 51 lines · Alexander Kanavin

Please share your complete recipe and all of the error message, otherwise it’s impossible to tell what is happening.

Alex

Quoted 43 lines · Ashu Joshi

Hello,
I am trying to install wirpas_gateway package from pypi using yocto recipe.. Once service is build completely and I flash image to target, i don't see any of the installed packages. Does anyone has nay reference how to install these packages in target as well. I dont see any generated binary which i can ship tp target. However, source code of the package can be seen in work directory. Currently I am trying to do something like below:

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

      install -m 0755 -d ${D}/usr/share/wirepas_gateway
      install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3

${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

wirepas_gateway-1.4.3 is directory which contains setup and other files. Getting error while trying to ship this to target.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#62809):
https://lists.yoctoproject.org/g/yocto/message/62809
Mute This Topic:
https://lists.yoctoproject.org/mt/105061124/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#9 lore raw

But I can see python3.8 present in usr/lib and if I go in that directory, I can see encodings as well.. see below output in target's terminal.

/usr/lib/python3.8 $
/usr/lib/python3.8 $ find -iname "encodings"
./encodings

Quoted 187 lines · Alexander Kanavin

This means the python installation on the target is incomplete/broken. You need to look into how the image was formed because encodings module is included in the core python package and is normally always present.

Alex

Quoted 179 lines · Ashu Joshi

How do i start python3 because when i try to start python by writing python3 in target's terminal, i get above error message related to encodings.

Quoted 172 lines · Alexander Kanavin

You need to first start python3 and run it there, not directly from the shell.

Alex

Quoted 165 lines · Ashu Joshi

It doesn't allow me to run import encodings as it is giving another error import:not found

Quoted 159 lines · Alexander Kanavin

It's a little odd that the application is looking for python modules in /lib and not /usr/lib.

If you run python3 on the target and issue 'import encodings', does that work? Then they are installed in /usr/lib, and you need to find out why the app redirects python to look elsewhere.

Alex

Quoted 147 lines · Ashu Joshi

It seems I have been able to install the package in gateway but getting some encoding related error. Below is the error:

~ $ wm-gw --help
Python path configuration:
PYTHONHOME = '/'
PYTHONPATH = (not set)
program name = 'python3'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/usr/bin/python3'
sys.base_prefix = '/'
sys.base_exec_prefix = '/'
sys.executable = '/usr/bin/python3'
sys.prefix = '/'
sys.exec_prefix = '/'
sys.path = [

    'lib/python38.zip',
    '/lib/python3.8',
    '/lib/python3.8/lib-dynload',

]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

I even tried to unset PYTHONHOME and PYTHONPATH by adding below in the recipe file but still encountering the same error. Any idea how to fix this?

do_configure(){
unset PYTHONPATH
unset PYTHONHOME
}

Quoted 105 lines · Ashu Joshi

Entire recipe is:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:" DESCRIPTION = "Wirepas gateway transport service that connects the local dbus to a remote MQTT broker"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cb6bb17b0d0cca188339074207e9f4d8"

SRC_URI = "file://wirepasTransport.service \
           file://settings.yml \

"

PYPI_PACKAGE = "wirepas_gateway"
PV = "1.4.3"
inherit pypi pkgconfig setuptools3

SRC_URI[md5sum] = "941a4407513445c64f16b57a1474fc43"

DEPENDS += "systemd python3 python3-pkgconfig-native python3-pip"

SYSTEMD_SERVICE_${PN} = "wirepasTransport.service" SYSTEMD_AUTO_ENABLE_${PN} = "enable"

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

# install -m 0755 -d ${D}/usr/share/wirepas_gateway
# install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3
${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
#FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

Error was basically because of commented code wherein I was trying to export the entire directory. I have commented out that for now.. I found that by creating rpm or opkg package we can export the package to target. Need help around that, if that is the correct way and how to use this method in yocto recipe. If not, what can be the other way using which we can ship or install the package in target.

Quoted 52 lines · Alexander Kanavin

Please share your complete recipe and all of the error message, otherwise it’s impossible to tell what is happening.

Alex

Quoted 44 lines · Ashu Joshi

Hello,
I am trying to install wirpas_gateway package from pypi using yocto recipe.. Once service is build completely and I flash image to target, i don't see any of the installed packages. Does anyone has nay reference how to install these packages in target as well. I dont see any generated binary which i can ship tp target. However, source code of the package can be seen in work directory. Currently I am trying to do something like below:

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

      install -m 0755 -d ${D}/usr/share/wirepas_gateway
      install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3

${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

wirepas_gateway-1.4.3 is directory which contains setup and other files. Getting error while trying to ship this to target.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#62809):
https://lists.yoctoproject.org/g/yocto/message/62809
Mute This Topic:
https://lists.yoctoproject.org/mt/105061124/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#10 lore raw

Do you have something odd in the shell environment that prevents python from looking in the right location?

Alex

Quoted 198 lines · Ashu Joshi

But I can see python3.8 present in usr/lib and if I go in that directory, I can see encodings as well.. see below output in target's terminal.

/usr/lib/python3.8 $
/usr/lib/python3.8 $ find -iname "encodings"
./encodings

Quoted 187 lines · Alexander Kanavin

This means the python installation on the target is incomplete/broken. You need to look into how the image was formed because encodings module is included in the core python package and is normally always present.

Alex

Quoted 179 lines · Ashu Joshi

How do i start python3 because when i try to start python by writing python3 in target's terminal, i get above error message related to encodings.

Quoted 172 lines · Alexander Kanavin

You need to first start python3 and run it there, not directly from the shell.

Alex

Quoted 165 lines · Ashu Joshi

It doesn't allow me to run import encodings as it is giving another error import:not found

Quoted 159 lines · Alexander Kanavin

It's a little odd that the application is looking for python modules in /lib and not /usr/lib.

If you run python3 on the target and issue 'import encodings', does that work? Then they are installed in /usr/lib, and you need to find out why the app redirects python to look elsewhere.

Alex

Quoted 147 lines · Ashu Joshi

It seems I have been able to install the package in gateway but getting some encoding related error. Below is the error:

~ $ wm-gw --help
Python path configuration:
PYTHONHOME = '/'
PYTHONPATH = (not set)
program name = 'python3'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/usr/bin/python3'
sys.base_prefix = '/'
sys.base_exec_prefix = '/'
sys.executable = '/usr/bin/python3'
sys.prefix = '/'
sys.exec_prefix = '/'
sys.path = [

    'lib/python38.zip',
    '/lib/python3.8',
    '/lib/python3.8/lib-dynload',

]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

I even tried to unset PYTHONHOME and PYTHONPATH by adding below in the recipe file but still encountering the same error. Any idea how to fix this?

do_configure(){
unset PYTHONPATH
unset PYTHONHOME
}

Quoted 105 lines · Ashu Joshi

Entire recipe is:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:" DESCRIPTION = "Wirepas gateway transport service that connects the local dbus to a remote MQTT broker"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cb6bb17b0d0cca188339074207e9f4d8"

SRC_URI = "file://wirepasTransport.service \
           file://settings.yml \

"

PYPI_PACKAGE = "wirepas_gateway"
PV = "1.4.3"
inherit pypi pkgconfig setuptools3

SRC_URI[md5sum] = "941a4407513445c64f16b57a1474fc43"

DEPENDS += "systemd python3 python3-pkgconfig-native python3-pip"

SYSTEMD_SERVICE_${PN} = "wirepasTransport.service" SYSTEMD_AUTO_ENABLE_${PN} = "enable"

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

# install -m 0755 -d ${D}/usr/share/wirepas_gateway
# install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3
${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
#FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

Error was basically because of commented code wherein I was trying to export the entire directory. I have commented out that for now.. I found that by creating rpm or opkg package we can export the package to target. Need help around that, if that is the correct way and how to use this method in yocto recipe. If not, what can be the other way using which we can ship or install the package in target.

Quoted 52 lines · Alexander Kanavin

Please share your complete recipe and all of the error message, otherwise it’s impossible to tell what is happening.

Alex

Quoted 44 lines · Ashu Joshi

Hello,
I am trying to install wirpas_gateway package from pypi using yocto recipe.. Once service is build completely and I flash image to target, i don't see any of the installed packages. Does anyone has nay reference how to install these packages in target as well. I dont see any generated binary which i can ship tp target. However, source code of the package can be seen in work directory. Currently I am trying to do something like below:

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

      install -m 0755 -d ${D}/usr/share/wirepas_gateway
      install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3

${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

wirepas_gateway-1.4.3 is directory which contains setup and other files. Getting error while trying to ship this to target.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#62809):
https://lists.yoctoproject.org/g/yocto/message/62809
Mute This Topic:
https://lists.yoctoproject.org/mt/105061124/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#11 lore raw

I am not able to figure out.. Is there any way we can override the location where application looks for python may be in recipe file or some setting, conf file?

Quoted 206 lines · Alexander Kanavin,

Do you have something odd in the shell environment that prevents python from looking in the right location?

Alex

Quoted 199 lines · Ashu Joshi

But I can see python3.8 present in usr/lib and if I go in that directory, I can see encodings as well.. see below output in target's terminal.

/usr/lib/python3.8 $
/usr/lib/python3.8 $ find -iname "encodings"
./encodings

Quoted 188 lines · Alexander Kanavin

This means the python installation on the target is incomplete/broken. You need to look into how the image was formed because encodings module is included in the core python package and is normally always present.

Alex

Quoted 180 lines · Ashu Joshi

How do i start python3 because when i try to start python by writing python3 in target's terminal, i get above error message related to encodings.

Quoted 173 lines · Alexander Kanavin

You need to first start python3 and run it there, not directly from the shell.

Alex

Quoted 165 lines · Ashu Joshi

It doesn't allow me to run import encodings as it is giving another error import:not found

Quoted 159 lines · Alexander Kanavin

It's a little odd that the application is looking for python modules in /lib and not /usr/lib.

If you run python3 on the target and issue 'import encodings', does that work? Then they are installed in /usr/lib, and you need to find out why the app redirects python to look elsewhere.

Alex

Quoted 147 lines · Ashu Joshi

It seems I have been able to install the package in gateway but getting some encoding related error. Below is the error:

~ $ wm-gw --help
Python path configuration:
PYTHONHOME = '/'
PYTHONPATH = (not set)
program name = 'python3'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/usr/bin/python3'
sys.base_prefix = '/'
sys.base_exec_prefix = '/'
sys.executable = '/usr/bin/python3'
sys.prefix = '/'
sys.exec_prefix = '/'
sys.path = [

    'lib/python38.zip',
    '/lib/python3.8',
    '/lib/python3.8/lib-dynload',

]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

I even tried to unset PYTHONHOME and PYTHONPATH by adding below in the recipe file but still encountering the same error. Any idea how to fix this?

do_configure(){
unset PYTHONPATH
unset PYTHONHOME
}

Quoted 105 lines · Ashu Joshi

Entire recipe is:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:" DESCRIPTION = "Wirepas gateway transport service that connects the local dbus to a remote MQTT broker"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cb6bb17b0d0cca188339074207e9f4d8"

SRC_URI = "file://wirepasTransport.service \
           file://settings.yml \

"

PYPI_PACKAGE = "wirepas_gateway"
PV = "1.4.3"
inherit pypi pkgconfig setuptools3

SRC_URI[md5sum] = "941a4407513445c64f16b57a1474fc43"

DEPENDS += "systemd python3 python3-pkgconfig-native python3-pip"

SYSTEMD_SERVICE_${PN} = "wirepasTransport.service" SYSTEMD_AUTO_ENABLE_${PN} = "enable"

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

# install -m 0755 -d ${D}/usr/share/wirepas_gateway
# install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3
${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
#FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

Error was basically because of commented code wherein I was trying to export the entire directory. I have commented out that for now.. I found that by creating rpm or opkg package we can export the package to target. Need help around that, if that is the correct way and how to use this method in yocto recipe. If not, what can be the other way using which we can ship or install the package in target.

Quoted 52 lines · Alexander Kanavin

Please share your complete recipe and all of the error message, otherwise it’s impossible to tell what is happening.

Alex

Quoted 44 lines · Ashu Joshi

Hello,
I am trying to install wirpas_gateway package from pypi using yocto recipe.. Once service is build completely and I flash image to target, i don't see any of the installed packages. Does anyone has nay reference how to install these packages in target as well. I dont see any generated binary which i can ship tp target. However, source code of the package can be seen in work directory. Currently I am trying to do something like below:

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

      install -m 0755 -d ${D}/usr/share/wirepas_gateway
      install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3

${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

wirepas_gateway-1.4.3 is directory which contains setup and other files. Getting error while trying to ship this to target.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#62809):
https://lists.yoctoproject.org/g/yocto/message/62809
Mute This Topic:
https://lists.yoctoproject.org/mt/105061124/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#12 lore raw

Does anyone knows aby other way how to resolve this python related issue? I even tried to export path in local.conf file but even that is not working. Also tried to create soft link for /lib pointing to /usr/lib but it gives permission denied error. When trying with sudo there is LD_PRELOAD related error.

Quoted 217 lines · Ashu Joshi,

I am not able to figure out.. Is there any way we can override the location where application looks for python may be in recipe file or some setting, conf file?

Quoted 208 lines · Alexander Kanavin,

Do you have something odd in the shell environment that prevents python from looking in the right location?

Alex

Quoted 201 lines · Ashu Joshi

But I can see python3.8 present in usr/lib and if I go in that directory, I can see encodings as well.. see below output in target's terminal.

/usr/lib/python3.8 $
/usr/lib/python3.8 $ find -iname "encodings"
./encodings

Quoted 189 lines · Alexander Kanavin

This means the python installation on the target is incomplete/broken. You need to look into how the image was formed because encodings module is included in the core python package and is normally always present.

Alex

Quoted 181 lines · Ashu Joshi

How do i start python3 because when i try to start python by writing python3 in target's terminal, i get above error message related to encodings.

Quoted 174 lines · Alexander Kanavin

You need to first start python3 and run it there, not directly from the shell.

Alex

Quoted 166 lines · Ashu Joshi

It doesn't allow me to run import encodings as it is giving another error import:not found

Quoted 160 lines · Alexander Kanavin

It's a little odd that the application is looking for python modules in /lib and not /usr/lib.

If you run python3 on the target and issue 'import encodings', does that work? Then they are installed in /usr/lib, and you need to find out why the app redirects python to look elsewhere.

Alex

Quoted 148 lines · Ashu Joshi

It seems I have been able to install the package in gateway but getting some encoding related error. Below is the error:

~ $ wm-gw --help
Python path configuration:
PYTHONHOME = '/'
PYTHONPATH = (not set)
program name = 'python3'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/usr/bin/python3'
sys.base_prefix = '/'
sys.base_exec_prefix = '/'
sys.executable = '/usr/bin/python3'
sys.prefix = '/'
sys.exec_prefix = '/'
sys.path = [

    'lib/python38.zip',
    '/lib/python3.8',
    '/lib/python3.8/lib-dynload',

]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

I even tried to unset PYTHONHOME and PYTHONPATH by adding below in the recipe file but still encountering the same error. Any idea how to fix this?

do_configure(){
unset PYTHONPATH
unset PYTHONHOME
}

Quoted 106 lines · Ashu Joshi

Entire recipe is:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:" DESCRIPTION = "Wirepas gateway transport service that connects the local dbus to a remote MQTT broker"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cb6bb17b0d0cca188339074207e9f4d8"

SRC_URI = "file://wirepasTransport.service \
           file://settings.yml \

"

PYPI_PACKAGE = "wirepas_gateway"
PV = "1.4.3"
inherit pypi pkgconfig setuptools3

SRC_URI[md5sum] = "941a4407513445c64f16b57a1474fc43"

DEPENDS += "systemd python3 python3-pkgconfig-native python3-pip"

SYSTEMD_SERVICE_${PN} = "wirepasTransport.service" SYSTEMD_AUTO_ENABLE_${PN} = "enable"

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

# install -m 0755 -d ${D}/usr/share/wirepas_gateway
# install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3
${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
#FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

Error was basically because of commented code wherein I was trying to export the entire directory. I have commented out that for now.. I found that by creating rpm or opkg package we can export the package to target. Need help around that, if that is the correct way and how to use this method in yocto recipe. If not, what can be the other way using which we can ship or install the package in target.

Quoted 53 lines · Alexander Kanavin

Please share your complete recipe and all of the error message, otherwise it’s impossible to tell what is happening.

Alex

Quoted 45 lines · Ashu Joshi

Hello,
I am trying to install wirpas_gateway package from pypi using yocto recipe.. Once service is build completely and I flash image to target, i don't see any of the installed packages. Does anyone has nay reference how to install these packages in target as well. I dont see any generated binary which i can ship tp target. However, source code of the package can be seen in work directory. Currently I am trying to do something like below:

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

      install -m 0755 -d ${D}/usr/share/wirepas_gateway
      install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3

${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway" FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

wirepas_gateway-1.4.3 is directory which contains setup and other files. Getting error while trying to ship this to target.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#62809):
https://lists.yoctoproject.org/g/yocto/message/62809
Mute This Topic:
https://lists.yoctoproject.org/mt/105061124/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#13 lore raw

I think you have to get an expert to boot your system and look at it directly. If we can’t reproduce the issue, it’s just too much effort to exchange emails for no reward at all other than thanks. It’s open source, that’s how it works.

Alex

Quoted 226 lines · Ashu Joshi

Does anyone knows aby other way how to resolve this python related issue? I even tried to export path in local.conf file but even that is not working. Also tried to create soft link for /lib pointing to /usr/lib but it gives permission denied error. When trying with sudo there is LD_PRELOAD related error.

Quoted 218 lines · Ashu Joshi,

I am not able to figure out.. Is there any way we can override the location where application looks for python may be in recipe file or some setting, conf file?

Quoted 209 lines · Alexander Kanavin,

Do you have something odd in the shell environment that prevents python from looking in the right location?

Alex

Quoted 202 lines · Ashu Joshi

But I can see python3.8 present in usr/lib and if I go in that directory, I can see encodings as well.. see below output in target's terminal.

/usr/lib/python3.8 $
/usr/lib/python3.8 $ find -iname "encodings"
./encodings

Quoted 190 lines · Alexander Kanavin

This means the python installation on the target is incomplete/broken. You need to look into how the image was formed because encodings module is included in the core python package and is normally always present.

Alex

Quoted 182 lines · Ashu Joshi

How do i start python3 because when i try to start python by writing python3 in target's terminal, i get above error message related to encodings.

Quoted 175 lines · Alexander Kanavin

You need to first start python3 and run it there, not directly from the shell.

Alex

Quoted 167 lines · Ashu Joshi

It doesn't allow me to run import encodings as it is giving another error import:not found

Quoted 161 lines · Alexander Kanavin

It's a little odd that the application is looking for python modules in /lib and not /usr/lib.

If you run python3 on the target and issue 'import encodings', does that work? Then they are installed in /usr/lib, and you need to find out why the app redirects python to look elsewhere.

Alex

Quoted 149 lines · Ashu Joshi

It seems I have been able to install the package in gateway but getting some encoding related error. Below is the error:

~ $ wm-gw --help
Python path configuration:
PYTHONHOME = '/'
PYTHONPATH = (not set)
program name = 'python3'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/usr/bin/python3'
sys.base_prefix = '/'
sys.base_exec_prefix = '/'
sys.executable = '/usr/bin/python3'
sys.prefix = '/'
sys.exec_prefix = '/'
sys.path = [

    'lib/python38.zip',
    '/lib/python3.8',
    '/lib/python3.8/lib-dynload',

]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

I even tried to unset PYTHONHOME and PYTHONPATH by adding below in the recipe file but still encountering the same error. Any idea how to fix this?

do_configure(){
unset PYTHONPATH
unset PYTHONHOME
}

Quoted 107 lines · Ashu Joshi

Entire recipe is:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:" DESCRIPTION = "Wirepas gateway transport service that connects the local dbus to a remote MQTT broker"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cb6bb17b0d0cca188339074207e9f4d8"

SRC_URI = "file://wirepasTransport.service \
           file://settings.yml \

"

PYPI_PACKAGE = "wirepas_gateway"
PV = "1.4.3"
inherit pypi pkgconfig setuptools3

SRC_URI[md5sum] = "941a4407513445c64f16b57a1474fc43"

DEPENDS += "systemd python3 python3-pkgconfig-native python3-pip"

SYSTEMD_SERVICE_${PN} = "wirepasTransport.service" SYSTEMD_AUTO_ENABLE_${PN} = "enable"

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

# install -m 0755 -d ${D}/usr/share/wirepas_gateway
# install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3
${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway" #FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

Error was basically because of commented code wherein I was trying to export the entire directory. I have commented out that for now.. I found that by creating rpm or opkg package we can export the package to target. Need help around that, if that is the correct way and how to use this method in yocto recipe. If not, what can be the other way using which we can ship or install the package in target.

Quoted 53 lines · Alexander Kanavin

Please share your complete recipe and all of the error message, otherwise it’s impossible to tell what is happening.

Alex

Quoted 45 lines · Ashu Joshi

Hello,
I am trying to install wirpas_gateway package from pypi using
yocto recipe.. Once service is build completely and I flash image to
target, i don't see any of the installed packages. Does anyone has nay
reference how to install these packages in target as well. I dont see any
generated binary which i can ship tp target. However, source code of the
package can be seen in work directory. Currently I am trying to do
something like below:

do_install() {
install -m 0755 -d ${D}${sysconfdir}/systemd/system
install -m 0755 ${WORKDIR}/wirepasTransport.service
${D}${sysconfdir}/systemd/system

install -m 0755 -d ${D}/usr/share
install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

install -m 0755 -d ${D}/usr/share/wirepas_gateway
install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3
${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
FILES_${PN} +=
"/usr/share/wirepas_gateway/wirepas_gateway-1.4.3"
FILES_${PN} +=
"${sysconfdir}/systemd/system/wirepasTransport.service"
FILES_${PN} += "/usr/share/settings.yml"

wirepas_gateway-1.4.3 is directory which contains setup and
other files. Getting error while trying to ship this to target.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#62809):
https://lists.yoctoproject.org/g/yocto/message/62809
Mute This Topic:
https://lists.yoctoproject.org/mt/105061124/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [
[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

A message that is not in the archive (sent off-list or not yet received): [email protected]

#15 lore raw

That said, there's one thing you *can* do. Abandon whatever legacy yocto build and images you have, and set up a clean yocto build directly from the poky repository, targeting one of the qemu machines (this is the default). Then build an image with python in it (e.g. core-image-full-cmdline), then boot it in qemu and verify that python can start. Then add your app recipe and check that. It won't answer the question about why your existing build has a broken python, but it will give you a working setup that you can then bring step by step to match your requirements.

Alex

Quoted 240 lines · Alexander Kanavin via lists.yoctoproject.org

I think you have to get an expert to boot your system and look at it directly. If we can’t reproduce the issue, it’s just too much effort to exchange emails for no reward at all other than thanks. It’s open source, that’s how it works.

Alex

Quoted 6 lines · Ashu Joshi

Does anyone knows aby other way how to resolve this python related issue? I even tried to export path in local.conf file but even that is not working. Also tried to create soft link for /lib pointing to /usr/lib but it gives permission denied error. When trying with sudo there is LD_PRELOAD related error.

Quoted 214 lines
Quoted 212 lines · Ashu Joshi,

I am not able to figure out.. Is there any way we can override the location where application looks for python may be in recipe file or some setting, conf file?

Quoted 203 lines · Alexander Kanavin,

Do you have something odd in the shell environment that prevents python from looking in the right location?

Alex

Quoted 196 lines · Ashu Joshi

But I can see python3.8 present in usr/lib and if I go in that directory, I can see encodings as well.. see below output in target's terminal.

/usr/lib/python3.8 $
/usr/lib/python3.8 $ find -iname "encodings"
./encodings

Quoted 184 lines · Alexander Kanavin

This means the python installation on the target is incomplete/broken. You need to look into how the image was formed because encodings module is included in the core python package and is normally always present.

Alex

Quoted 174 lines · Ashu Joshi

How do i start python3 because when i try to start python by writing python3 in target's terminal, i get above error message related to encodings.

Quoted 167 lines · Alexander Kanavin

You need to first start python3 and run it there, not directly from the shell.

Alex

Quoted 159 lines · Ashu Joshi

It doesn't allow me to run import encodings as it is giving another error import:not found

Quoted 153 lines · Alexander Kanavin

It's a little odd that the application is looking for python modules in /lib and not /usr/lib.

If you run python3 on the target and issue 'import encodings', does that work? Then they are installed in /usr/lib, and you need to find out why the app redirects python to look elsewhere.

Alex

Quoted 141 lines · Ashu Joshi

It seems I have been able to install the package in gateway but getting some encoding related error. Below is the error:

~ $ wm-gw --help
Python path configuration:
PYTHONHOME = '/'
PYTHONPATH = (not set)
program name = 'python3'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/usr/bin/python3'
sys.base_prefix = '/'
sys.base_exec_prefix = '/'
sys.executable = '/usr/bin/python3'
sys.prefix = '/'
sys.exec_prefix = '/'
sys.path = [

    'lib/python38.zip',
    '/lib/python3.8',
    '/lib/python3.8/lib-dynload',

]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

I even tried to unset PYTHONHOME and PYTHONPATH by adding below in the recipe file but still encountering the same error. Any idea how to fix this?

do_configure(){
unset PYTHONPATH
unset PYTHONHOME
}

Quoted 99 lines · Ashu Joshi

Entire recipe is:

FILESEXTRAPATHS_prepend := "${THISDIR}/files:" DESCRIPTION = "Wirepas gateway transport service that connects the local dbus to a remote MQTT broker"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cb6bb17b0d0cca188339074207e9f4d8"

SRC_URI = "file://wirepasTransport.service \
           file://settings.yml \

"

PYPI_PACKAGE = "wirepas_gateway"
PV = "1.4.3"
inherit pypi pkgconfig setuptools3

SRC_URI[md5sum] = "941a4407513445c64f16b57a1474fc43"

DEPENDS += "systemd python3 python3-pkgconfig-native python3-pip"

SYSTEMD_SERVICE_${PN} = "wirepasTransport.service" SYSTEMD_AUTO_ENABLE_${PN} = "enable"

do_install() {
      install -m 0755 -d ${D}${sysconfdir}/systemd/system
      install -m 0755 ${WORKDIR}/wirepasTransport.service

${D}${sysconfdir}/systemd/system

      install -m 0755 -d ${D}/usr/share
      install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

# install -m 0755 -d ${D}/usr/share/wirepas_gateway
# install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3
${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway" #FILES_${PN} += "/usr/share/wirepas_gateway/wirepas_gateway-1.4.3" FILES_${PN} += "${sysconfdir}/systemd/system/wirepasTransport.service" FILES_${PN} += "/usr/share/settings.yml"

Error was basically because of commented code wherein I was trying to export the entire directory. I have commented out that for now.. I found that by creating rpm or opkg package we can export the package to target. Need help around that, if that is the correct way and how to use this method in yocto recipe. If not, what can be the other way using which we can ship or install the package in target.

Quoted 44 lines · Alexander Kanavin

Please share your complete recipe and all of the error
message, otherwise it’s impossible to tell what is happening.

Alex

On Thu 21. Mar 2024 at 8.29, Ashu Joshi <[email protected]>
wrote:

Hello,
I am trying to install wirpas_gateway package from pypi using
yocto recipe.. Once service is build completely and I flash image to
target, i don't see any of the installed packages. Does anyone has nay
reference how to install these packages in target as well. I dont see any
generated binary which i can ship tp target. However, source code of the
package can be seen in work directory. Currently I am trying to do
something like below:

do_install() {
install -m 0755 -d ${D}${sysconfdir}/systemd/system
install -m 0755 ${WORKDIR}/wirepasTransport.service
${D}${sysconfdir}/systemd/system

install -m 0755 -d ${D}/usr/share
install -m 0644 ${WORKDIR}/settings.yml ${D}/usr/share

install -m 0755 -d ${D}/usr/share/wirepas_gateway
install -m 0644 ${WORKDIR}/wirepas_gateway-1.4.3
${D}/usr/share/wirepas_gateway
}

FILES_${PN} += "usr/share/wirepas_gateway"
FILES_${PN} +=
"/usr/share/wirepas_gateway/wirepas_gateway-1.4.3"
FILES_${PN} +=
"${sysconfdir}/systemd/system/wirepasTransport.service"
FILES_${PN} += "/usr/share/settings.yml"

wirepas_gateway-1.4.3 is directory which contains setup and
other files. Getting error while trying to ship this to target.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#62854):
https://lists.yoctoproject.org/g/yocto/message/62854
Mute This Topic: https://lists.yoctoproject.org/mt/105061124/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-