Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
In the Salt grain.xml, https://www.klayout.de/package_cookbook.html, you provide the ability to provide a minimum version for dependencies. It is very useful.
If I have a package that requires a minimum Python version, is it possible to add this? Specifically, we have KLayout builds for Python 2.7 and 3.6 for Mac OS, and I would like be able to check if the user has the right one. If the user has the wrong one, then ideally KLayout would display a message with a URL link to the correct download page.
If this is not available, could you please add Python version as an option in grain.xml?
The proposal I have is to encode it in "api-version". This is a kind of natural extension.
In addition, more features can be added, e.g.:
This scheme is backward compatible as older version just check for the initial part. However, old versions would not complain.
Right now, there is a warning in the package selector:
But you can still install the package if you really want to.
How about this? This implementation is available as PR #396.
To restrict the requirements to a specific Python, Ruby or Qt major version it's now possible to use "python2", "python3", "ruby1", "ruby2", "qt4" and "qt5" features. Like this: <api-version>python2 2.7</api-version> will require python >=2.7.0, but Python 3 is not allowed.
after your comment I have included pseudo-features, specifically "python3" and "python2" which allow selecting for a specific Python major version. So if you want Python 2 only, you can specify:
Selecting Python 2 with 2.7 at least is possible with:
and simply saying
will give you any Python 3 version, but not Python 4, whatever this will bring ...