Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

3D Viewer & Salt dependency managment

Hi,
Recently I wrote a Python script for viewing layouts as 3D models in OpenSCAD. Initially it was just for fun but then I realized it's also quite helpful for debugging. Therefore I thought I'd best package it as a Salt module.

And here comes my question: Can Salt manage Python dependencies (PyPI/pip packages)? How do I tell Salt about them?

Comments

  • Hi tok,

    thanks for considering sharing your work!

    However, you cannot tell Salt about this currently. But you can document this dependency of course.

    An automated option (I have not tried myself) to take care of this is using an autorun script inside the module. Let this script run once (use your own configuration variable to mark it run). In this script you can try to pull the package from PyPI. But I suspect many side effects and error handling is crucial. Otherwise there is risk to damage a user's installation.

    But I'd be careful to require a specific Python module. Unless the module is a very common one, the dependency isn't easy to fulfil on all platforms.

    Regards,

    Matthias

  • Thanks for answering! Then I best let the users manage the dependencies. They need to install OpenSCAD manually anyway.

Sign In or Register to comment.