MySQL Support for Python that's not under GPL-Like Licenses [closed]

点点圈 提交于 2019-12-22 08:13:21

问题


I'm using Python/Django over MySQL. I'm currently working with MySQLdb that's under GNU GPL license. Is there a library with "similar" capabilities that's not under GPL-like licenses?

To clarify:

  • I don't know yet if I will want to distribute my source code or charge money for my application. What I do know is that I don't want these decisions to be made for me by my choice of MySQL and Python.
  • I'm currently building a web app using Django, for which I think the issue is irrelevant since I'm not "distributing" anything, but the Python code I'm writing may be viable for distribution as a desktop application and this is where the GPL starts bothering me.

Thanks


回答1:


You seem to misunderstand GPL. (Disclaimer: I am not a lawyer)

  • You can charge money for your application, even if it is licensed under GPL. GPL allows you to sell your code.
  • You don't have to distribute anything, even if your code is licensed under GPL.
  • You can't reliably distribute python code without distributing the source anyway.
  • Mysqldb is dual licensed. You may choose between python's license or GPL license.

EDIT: To clarify point 2, since some people got confused: You don't have to distribute anything, but if you do distribute something, you have to distribute the source code of it.




回答2:


I believe MySQLdb is dual-licensed under GPL or the Python license. The Python license lets you distribute binaries without source. The README in source distribution says:

License
-------
GPL or the original license based on Python 1.5.2's license.



回答3:


Had to check this myself, and there's a lot of misleading and erroneous information here.

The short version: You can't.

The MySQLdb1 - or python-mysqldb - package is licensed under GPL.

Earlier versions had a clause regarding optional usage of the python license, but that was never valid. The project included a _mysql.c file which has a copyright statement and license that is EXCLUSIVELY GPL2 or newer. As long as that file is there, you are bound by GPL, even if the documentation briefly said otherwise.

The mariadb client library is available as LGPL, and you can link to it instead of the mysql client library (GPL), but that's irrelevant as long as the project it self is GPL.

Since the official MariaDB documentation/site points at the above module, it looks like that the LGPL of MariaDB simply doesn't help Python-users.

If there's an alternate MariaDB/MySQL client library for Python, then that would be a different thing...




回答4:


A lot of...um...misleading answers here.

If python-MySQLdb is linked against Oracle's client library, which is GPL as of now (2014-02), then python-MySQLdb as well as the application that uses it get covered by the GPL -- which would be relevant in the desktop application distribution case.

python-MySQLdb 1.2.5 does work built and linked with mariadb-native-client 1.0.0, which is LGPL. In this case, using python-MySQLdb's "original license based on Python 1.5.2's license" may enable binary-only distribution of the desktop application (sources for the mariadb-native-client alone may need to be distributed in this case, if it is dynamically linked).



来源:https://stackoverflow.com/questions/853337/mysql-support-for-python-thats-not-under-gpl-like-licenses

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!