labgrid-project / meta-labgrid

OpenEmbedded layer for integrating the labgrid exporter on a device
MIT License
11 stars 12 forks source link

pyproject.toml packaging does not work correctly with kirkstone version of openembedded #33

Closed dwagenk closed 1 year ago

dwagenk commented 1 year ago

labgrid switched to pyproject.toml based packaging recently and support for that was added to this layer in 1d2b916100a8608cb524a4014bf784a2ac18a952 . The support for this in openembedded seems to be undergoing some change currently, but the implementation in openembedded-core@kirkstone does not fully support it. For labgrid (as packaged via the recipes in this layer@ 101db61ffeae383a8aef445646befe475605721d ) it produces a mostly empty package, lacking basically all of labgrid:

tree packages-split/python3-labgrid/
packages-split/python3-labgrid/
├── etc
│   └── labgrid
│       ├── configuration.yaml
│       └── environment
├── lib
│   └── systemd
│       ├── system
│       │   └── labgrid-exporter.service
│       └── system-preset
│           └── 98-python3-labgrid.preset
└── usr
    └── lib
        └── python3.11
            └── site-packages
                └── labgrid-23.0b2.dev20.dist-info
                    ├── entry_points.txt
                    ├── LICENSE
                    ├── METADATA
                    ├── RECORD
                    ├── top_level.txt
                    └── WHEEL

I'm leaving this here to document this behavior. I moved on to using the current master branch of openembedded-core and it works fine there.

In case anyone is looking into how to workaround this (since kirkstone is the current LTS release and compatibility with it would be nice) the command that is run and produces an almost empty wheel is:

# line: 33, file: /work/layers/external/poky/meta/classes/python_pep517.bbclass
python_pep517_do_compile() {
    cd /build/workspace/sources/python3-labgrid
    nativepython3 -c "import setuptools.build_meta as api; api.build_wheel('/build/tmp/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/python3-labgrid/git-r0/dist')"
}
Emantor commented 1 year ago

This should also work with the langdale release, thats what we are using in the meta-lxatac layer for the linux automation test automation controller. But still, unfortunate that this is currently broken on kirkstone and I don't think the necessary support will be backported.