I’m working on a new Python authentication library for WSGI frameworks and want to use the python-openid and maybe some other third-party libs too. I see 2 options:
- Distribute my library with a copy of the third-party library inside (via GIT submodules)
- Let the user of my library resolve the dependency on the third-party library by himself
The question is:
What is the preferred conventional way of incorporating a third party library in Python open source projects?
The preffered way is to use setuptools/distribute and define a setup.py for your project that downloads third-party libraries via PyPi.
Here’s an extract from one of my projects. Note the use of setup/install/test/extras-require keyword arguments, which is what you’re looking for
Full file here: https://bitbucket.org/marcusl/buildboticon/src/5232de5ead73/python/setup.py