can componentize-py bundle requirements? I'm thinking something along the lines of providing a virtualenv where the pure python packages the guest depends on are installed, but I'm unsure if that would work. Is this currently possible?
probably a question mainly for Joel :)
Yes, it can! If you're using pipenv
to manage your dependencies, componentize-py
should pick them up automatically: https://github.com/dicej/componentize-py/blob/a5437cf203321962df83afe449349e61762021a1/src/command.rs#L126-L153. For example the toml
package is pure Python, so you can pipenv install toml
and use it in your app with import toml
, and componentize-py
should bundle it automatically. If you're using a different tool to manage dependencies, you'll need to explicitly tell componentize-py
where they are on the host filesystem using --python-path
.
BTW, as of yesterday, you can now pip install componentize-py
, which hopefully makes it easier to experiment with.
oh that is good to know, having it on pypi is lowering the burden of entry greatly for my pythonic coworkers who are trying to get their feet wet ;)
thank you, I'll try with pipenv :)
@Joel Dice I would be careful about hard-coding installation tool support as pipenv is only one of multiple tools in the Python community (and it's not even the most popular).
Would you recommend removing that support or adding support for others (or both)?
We can talk about it on Thursday; depends on how much work you want to do and if you want to try and keep up with the Python packaging ecosystem :sweat_smile:
Last updated: Nov 22 2024 at 16:03 UTC