For my project I would be using the argparse library. My question is, how do I distribute it with my project. I am asking this because of the technicalities and legalities involved.
Do I just:
- Put the argparse.py file along with
my project. That is, in the tar file for my project. - Create a package for it for my
distro? - Tell the user to install it himself?
What’s your target Python version? It appears that
argparseis included from version 2.7.If you’re building a small library with minimal dependencies, I would consider removing the dependency on an external module and only use facilities offered by the standard Python library. You can access command line parameters with
sys.argvand parse them yourself, it’s usually not that hard to do. Your users will definitely appreciate not having to install yet another third party module just to use your code.