-
-
Notifications
You must be signed in to change notification settings - Fork 28
Add pixi support #319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pixi support #319
Conversation
Still need to add a few things (a unit test and a proper documentation, mostly) Not source whether the brand new yaml component is required as it only contains a single function... |
Great! ⭐ I will be away for a few days, attending FOSDEM 25. But will have a closer look when I'm back (next week). |
This project is a Polylith project itself ♾️ and you can use the poly commands to check things if you like (using |
Hello @DavidVujic , Seems ok for my point of view. Regarding the docs, do you want me to open a PR in the Happy FOSDEM |
An example repo would be great! |
Agreed. I'll made an example, working pixi repo based on the other example repos (uv, rye, pants, etc) and with the same components, etc |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thank you! 👏 ⭐
Hello @DavidVujic, Thanks for merging this PR. I'm currently working on a pixi-based python-polylith-example repositore, but the package building feature (using the I was able to generate a conda package by copying the required bricks folder in the project directory (i.e. copying What do you think about that? |
Maybe the things I added for Maturin users could be useful here? There’s build “setup” and “teardown” commands in the poly tool for any package management tool that has not support for hooks or plugins.
Have a look here:
https://davidvujic.github.io/python-polylith-docs/deployment/#maturin_1
|
Looks like that's exactly what I need! Nice! Let me toy a bit with that. I'll let you know when I had something polished enough. Thank you very much for that hint ;-) |
Here is the example repository adapted to pixi. The I've tested all projects I can (except for the AWS lambda project) using a local Quetz instance. The basic workflow I've followed
pixi run poly build setup
pixi build
pixi run poly build teardown
pixi add my_package
pixi run start # whenever a pixi task is defined
# or
pixi run consumer # whenever an entrypoint is defined I've changed the projects' README accordingly. So far, I'm not aware of a way to install a conda package from a local file, so I could not fit to the docker examples and I turned them into full pixi examples (but I could turn them into docker as a docker image for pixi exists. Let me know what think! PS: I'll be completely offline till Monday so I would not be able keep working on that for the next 3-4 days ;-) |
This is great! ⭐ I would like to link to your example repo from the readme and also in the docs, would that be ok with you? |
Yes, sure! I will try to update it once the |
I've added the Pixi repo to the docs here: https://davidvujic.github.io/python-polylith-docs/examples/ |
Thanks for letting me know! Awesome! There is just a typo in my last name (Langenfeld instead of Lagenfeld) and it will be perfect ;-) |
My apologies! 🙇 I have updated the page now 🙏 |
Thank you very much! |
This PR adds support for the pixi as a potential backend. This would allow users to use packages from the conda ecosystem.
Description
Pixi manages a lockfile in a similar fashion as poetry, except it works with packages from both PyPI and conda. The main difference is the lockfil format, as pixi's lockfile format is YAML. The main changes will be to:
pixi.lock
to the python-polylith list of lock filespyproject.toml
filesMotivation and Context
All current backends supported by python-polylith are PyPI-based. Some packages are only available through the conda ecosystem, though. This PR would solve this limitation.
How Has This Been Tested?
So far, I've made a prototype of the changes envisioned, and tested it with the
poly libs
andpoly check
commands to ensure that the third-party libraries are either found or missing as one may expect.Types of changes
Checklist: