Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
439 views
in Technique[技术] by (71.8m points)

installation - setuptools3 bitbake recipe fails on target install due to different source vs. target name

I generated a simple bitbake recipe for pytorch using pipoe:

pipoe --package pytorch -y python3 -v 1.0.2 -d MIT

When I attempt to build my yocto project, I get the following error during setuptools3's do_install:

/home/engineer/proj/poky-tx2i/build/tmp/work/aarch64-poky-linux/python3-pytorch/1.0.2-r0/temp/run.do_install.95746' failed with exit code 1: | Traceback (most recent call last): | File "setup.py", line 11, in | raise Exception(message) | Exception: You tried to install "pytorch". The package named for PyTorch is "torch" | WARNING: exit code 1 from a shell command. |

I've auto-generated many other python recipes using pipoe and they all worked fine because the source name matches the install name (example python3-cffi installs as cffi.py). In the case of pytorch, the source name is python3-pytorch, but it wants to install as torch.py.

Here is the auto-generated recipe with a few simple things that I tried commented out because they did not improve anything. I think my override of do_install has promise, but as you can see I'm uncertain what to use as the install source? I'd appreciate any advice. Thanks.


SUMMARY = ""
HOMEPAGE = ""
# I ADDED THIS
SRCNAME = "torch"
AUTHOR = "Soumith Chintala <[email protected]>"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://setup.py;md5=030c79355ff9e6b2579898692608c840"

SRC_URI = "https://files.pythonhosted.org/packages/ee/67/f403d4ae6e9cd74b546ee88cccdb29b8415a9c1b3d80aebeb20c9ea91d96/pytorch-${PV}.tar.gz"
SRC_URI[md5sum] = "7c84c6e7a032849cdd75f85cdae3916c"
SRC_URI[sha256sum] = "a6915d372c085a02eceebf59d16cbcc18a2693ac3487a53e3cc8be31fee65079"

S = "${WORKDIR}/pytorch-${PV}"

RDEPENDS_${PN} = ""

inherit setuptools3

# I ADDED THIS, BUT IT DIDN"T HELP
#PYPI_PACKAGE = "${SRCNAME}"

# I ADDED THIS DUE TO THE ERROR
#do_install() {
#   install -d ${D}${libdir}/${PYTHON_PN}
#   install -m 0755 ${S}/<WHAT DO I PUT HERE!!!> ${D}${libdir}/${PYTHON_PN}/${SRCNAME}.py
#}



question from:https://stackoverflow.com/questions/65929746/setuptools3-bitbake-recipe-fails-on-target-install-due-to-different-source-vs-t

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...