[setup] Install correct mysql driver

This commit is contained in:
Ferdinand Thiessen 2021-03-18 14:05:28 +01:00
parent fb8371afb9
commit 87f9b0aa48
2 changed files with 7 additions and 1 deletions

View File

@ -17,8 +17,10 @@ You will also need a MySQL driver, recommended drivers are
- `mysqlclient` - `mysqlclient`
- `PyMySQL` - `PyMySQL`
`setup.py` will try to install a matching driver.
#### Windows #### Windows
Same as above, but for mysql you have to follow this guide: Same as above, but if you want to use `mysqlclient` instead of `PyMySQL` (performance?) you have to follow this guide:
https://www.radishlogic.com/coding/python-3/installing-mysqldb-for-python-3-in-windows/ https://www.radishlogic.com/coding/python-3/installing-mysqldb-for-python-3-in-windows/

View File

@ -1,4 +1,7 @@
from setuptools import setup, find_packages from setuptools import setup, find_packages
import os
mysql_driver = "PyMySQL" if os.name == "nt" else "mysqlclient"
setup( setup(
name="flaschengeist", name="flaschengeist",
@ -19,6 +22,7 @@ setup(
"flask_sqlalchemy", "flask_sqlalchemy",
"flask_cors", "flask_cors",
"werkzeug", "werkzeug",
mysql_driver
], ],
extras_require={"ldap": ["flask_ldapconn", "ldap3"], "test": ["pytest", "coverage"]}, extras_require={"ldap": ["flask_ldapconn", "ldap3"], "test": ["pytest", "coverage"]},
entry_points={ entry_points={