Skip to content

Commit

Permalink
Merge pull request #194 from jhnc-oss/193-debugpy
Browse files Browse the repository at this point in the history
Update debugpy 1.8.0 and fix .so files
  • Loading branch information
offa authored Nov 24, 2023
2 parents eddf884 + eaf9e4a commit be6e3db
Showing 1 changed file with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,32 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=7b6b095fe2a2e2b66cb08d295b605789"

CVE_PRODUCT = ""

SRC_URI[sha256sum] = "7b79c40852991f7b6c3ea65845ed0f5f6b731c37f4f9ad9c61e2ab4bd48a9275"
SRC_URI[sha256sum] = "12af2c55b419521e33d5fb21bd022df0b5eb267c3e178f1d374a63a2a6bdccd0"

PYPI_PACKAGE = "debugpy"
PYPI_PACKAGE_EXT = "zip"

def get_so_target(d):
if d.getVar('MACHINE_ARCH') == 'genericx86':
return 'attach_linux:x86'
return 'attach_linux_amd64'
def get_so_suffix(d):
arch = d.getVar('MACHINE_ARCH')

do_compile:append() {
find ${WORKDIR} -name attach_linux\*.so -exec rm -rf {} \;
if arch == 'genericx86':
return 'x86'
if arch == 'genericx86_64':
return 'amd64'
bb.error("Unsupported architecture")

do_compile:append() {
cd ${WORKDIR}/${PN}-${PV}/src/${PN}/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac
${CXX} ${LDFLAGS} -shared -o ${@get_so_target(d)}.so -fPIC -nostartfiles attach.cpp

mv ${@get_so_target(d)}.so ../${@get_so_target(d)}.so
${CXX} ${LDFLAGS} -std=c++11 -shared -fPIC -nostartfiles attach.cpp -o attach_linux_${@get_so_suffix(d)}.so
}

do_install:append() {
install ${WORKDIR}/${PN}-${PV}/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/attach_linux_*.so ${D}${PYTHON_SITEPACKAGES_DIR}/debugpy/_vendored/pydevd/pydevd_attach_to_process/
chmod -R 0755 ${D}${libdir}
}

RDEPENDS:${PN} += "glibc"

inherit pypi setuptools3

RDEPENDS:${PN} += "glibc"

BBCLASSEXTEND = "native nativesdk"

0 comments on commit be6e3db

Please sign in to comment.