yocto.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* #bitbake
@ 2023-03-21 15:51 elshoud
  2023-03-21 16:01 ` [yocto] #bitbake Tim Orling
  0 siblings, 1 reply; 2+ messages in thread
From: elshoud @ 2023-03-21 15:51 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 2616 bytes --]

Hi,

I am new to the mailing list and hope that this is the right place to drop my question.
For my project I want to make use of the uvicorn package. Because I did not find any yocto recipe for the latest version I started making one but I am stumbling on the fact that there is no setup.py in the release.
There is a setup.cfg and a pyproject.toml in the tar.gz.

Current version at https://pypi.org/project/uvicorn/ is 0.21.1.

With the following bb file:

> 
> SUMMARY = "To be completed"
> 
> LICENSE = "BSD-3-Clause"
> LIC_FILES_CHKSUM = "file://LICENSE;md5=5c778842f66a649636561c423c0eec2e"
> 
> SRC_URI[sha256sum] =
> "9b00c0105f8ad968ac8be1cac44056bb1dc7d37dafb42ea1a4dc787e3ccc6b86"
> 
> inherit pypi setuptools3
> 
> 

When building, I get an error because there is no setup.py:

> 
> ERROR: python3-uvicorn-0.21.1-r0 do_compile: 'python3 setup.py bdist_wheel
> ' execution failed.
> ERROR: python3-uvicorn-0.21.1-r0 do_compile:
> ExecutionError(/tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/temp/run.do_compile.2246273',
> 1, None, None)
> ERROR: Logfile of failure stored in:
> /tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/temp/log.do_compile.2246273
> 
> Log data follows:
> | DEBUG: Executing shell function do_compile
> |
> /tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/recipe-sysroot-native/usr/bin/python3-native/python3:
> can't open file
> '/tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/uvicorn-0.21.1/setup.py':
> [Errno 2] No such file or directory
> | ERROR: 'python3 setup.py bdist_wheel ' execution failed.
> | WARNING:
> /tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/temp/run.do_compile.2246273:180
> exit 1 from 'exit 1'
> | WARNING: Backtrace (BB generated script):
> | #1: bbfatal_log,
> /tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/temp/run.do_compile.2246273,
> line 180
> | #2: setuptools3_do_compile,
> /tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/temp/run.do_compile.2246273,
> line 170
> | #3: do_compile,
> /tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/temp/run.do_compile.2246273,
> line 152
> | #4: main,
> /tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/temp/run.do_compile.2246273,
> line 184
> 
> 

What is the best way forward to get the package baked? Is it possible to create the setup.py from the pyproject.toml?

Many thanks in advance,
Edwin Elshoud

[-- Attachment #2: Type: text/html, Size: 3269 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [yocto] #bitbake
  2023-03-21 15:51 #bitbake elshoud
@ 2023-03-21 16:01 ` Tim Orling
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Orling @ 2023-03-21 16:01 UTC (permalink / raw)
  To: elshoud; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 3856 bytes --]

On Tue, Mar 21, 2023 at 8:51 AM elshoud <elshoud@gmail.com> wrote:

> Hi,
>
> I am new to the mailing list and hope that this is the right place to drop
> my question.
> For my project I want to make use of the uvicorn package. Because I did
> not find any yocto recipe for the latest version I started making one but I
> am stumbling on the fact that there is no setup.py in the release.
> There is a setup.cfg and a pyproject.toml in the tar.gz.
>

Since uvicorn has a proper pyproject.toml, you will want to use the new
"PEP-517" classes available since 'kirkstone' Yocto Project release.
You want to look at the pyproject.toml "build-backend" line:
https://github.com/encode/uvicorn/blob/master/pyproject.toml#L3
build-backend = "hatchling.build"

This tells you which of the "PEP-517" classes to use.


>
> Current version at https://pypi.org/project/uvicorn/ is 0.21.1.
>
> With the following bb file:
>
>
>     SUMMARY = "To be completed"
>
>     LICENSE = "BSD-3-Clause"
>     LIC_FILES_CHKSUM =
> "file://LICENSE;md5=5c778842f66a649636561c423c0eec2e"
>
>     SRC_URI[sha256sum] =
> "9b00c0105f8ad968ac8be1cac44056bb1dc7d37dafb42ea1a4dc787e3ccc6b86"
>
>     inherit pypi setuptools3
>
> Since the build-backend is "hatching.build" , you want to replace
"setuptools3" with "python_hatchling"
https://git.yoctoproject.org/poky/tree/meta/classes-recipe/python_hatchling.bbclass
This class was introduced in the 'langdale' Yocto Project release.

>
>
> When building, I get an error because there is no setup.py:
>
>
> ERROR: python3-uvicorn-0.21.1-r0 do_compile: 'python3 setup.py bdist_wheel
> ' execution failed.
> ERROR: python3-uvicorn-0.21.1-r0 do_compile:
> ExecutionError(/tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/temp/run.do_compile.2246273',
> 1, None, None)
> ERROR: Logfile of failure stored in:
> /tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/temp/log.do_compile.2246273
> Log data follows:
> | DEBUG: Executing shell function do_compile
> |
> /tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/recipe-sysroot-native/usr/bin/python3-native/python3:
> can't open file
> '/tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/uvicorn-0.21.1/setup.py':
> [Errno 2] No such file or directory
> | ERROR: 'python3 setup.py bdist_wheel ' execution failed.
> | WARNING:
> /tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/temp/run.do_compile.2246273:180
> exit 1 from 'exit 1'
> | WARNING: Backtrace (BB generated script):
> | #1: bbfatal_log,
> /tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/temp/run.do_compile.2246273,
> line 180
> | #2: setuptools3_do_compile,
> /tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/temp/run.do_compile.2246273,
> line 170
> | #3: do_compile,
> /tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/temp/run.do_compile.2246273,
> line 152
> | #4: main,
> /tmp/work/cortexa9t2hf-neon-puppy-linux-gnueabi/python3-uvicorn/0.21.1-r0/temp/run.do_compile.2246273,
> line 184
>
>
> What is the best way forward to get the package baked? Is it possible to
> create the setup.py from the pyproject.toml?
>
> Many thanks in advance,
> Edwin Elshoud
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#59482):
> https://lists.yoctoproject.org/g/yocto/message/59482
> Mute This Topic: https://lists.yoctoproject.org/mt/97757830/924729
> Mute #bitbake:https://lists.yoctoproject.org/g/yocto/mutehashtag/bitbake
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [
> ticotimo@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 6020 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-21 16:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21 15:51 #bitbake elshoud
2023-03-21 16:01 ` [yocto] #bitbake Tim Orling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).