-
Notifications
You must be signed in to change notification settings - Fork 66
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
Some minor code adjustments plus a CLI #134
Conversation
There's a problem with using argparse here. It's not supported by default in 2.6 (which we should still support due to the % of companies using it). |
For argparse you can do conditional requirements (such as this example) |
From looking at the code, it seems that test case |
What do people think about an lsb_release compatible cli for distro? |
In what sense? |
As suggested by @asottile , do we agree that argparse should be conditional and that if someone who uses 2.6 doesn't have argparse it becomes a dependency? |
I think that's the better option, I personally find that argparse produces a way better command line tool than optparse. The oldest python version I used is 2.7 and I don't have any experience with optional dependencies so I don't know the pitfalls but it seems like a good solution. |
Another option would be to drop 2.6 support (which has been end of lifed for several years). |
69c0537
to
4c19e7f
Compare
Many companies still use 2.6. See the PR. I added |
If we're going to release 1.0.0, I think we need this in.. |
* The CLI allows to printout either json formatted info or human readable info. * Add a `distro` entry point so that you can run `distro` directly.
solves #133 |
No description provided.