pypackaging-native / pkgconf-pypi

Repository to build pkgconf binaries for distribution on PyPI, plus Python environment-aware pkg-config
https://pkgconf-pypi.readthedocs.io
MIT License
1 stars 2 forks source link

tool to create wheel + pc file from binary #50

Open virtuald opened 1 month ago

virtuald commented 1 month ago

I'm planning to move all my robotpy projects to meson, but hadn't really figured out the best way to make inter-wheel dependencies work -- so I'm glad I found this!

Background

My dependencies are built and published to a maven-like repo + artifacts. I take those, build pybind11 wrappers around them, and stick it all in a wheel that depends on other wheels (described here).

As part of this move to meson, I think what would make the most sense is for me to write a tool that gets the maven artifact, unzips it, adds a .pc file and entrypoint, and then publishes that wheel to pypi. Then all of my wrapper wheels can just specify the wheel that just has the native dependency in it in their build dependencies, and meson will magically find it and everything works.

The question

It seems to me that there are probably other people that would like to take binary artifacts and repackage them as wheels that can be consumed by something that uses pkg-config.

I'm also open to alternative solutions as well.

virtuald commented 1 month ago

I wrote a hatchling plugin to do this, along with some other stuff: https://github.com/virtuald/hatch-pkgconf-meson/tree/main/hatch-mkpkgconf