-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better support for building on Windows
mysqlclient can be built against either the MySQL Connector/C or the MariaDB Connector/C. Previously, which library was used was hardcoded in setup_windows.py while the path to the library was in site.cfg. Now both settings can be specified in site.cfg, as environment variables, or auto-detected. If a client isn't specified but a connector path is, that path will be searched for either mariadbclient.lib or mysqlclient.lib to set the client type. If a client is specified but a connector path isn't, the default path used by the pre-built .msi installers will be assumed. This will probably be "C:\Program Files\MariaDB\MariaDB Connector C" for mariadbclient and "C:\Program Files\MySQL\MySQL Connector C 6.1" for mysqlclient ("C:\Program Files (x86)" will be used on 32-bit builds). If neither client nor connector are specified, both client types will be checked to see if the appropriate .lib file exists in the default connector directory. These changes will allow users to install from source via pip (if binary wheels aren't available) without having to clone this repo to edit site.cfg. They can either install one of the connectors in the default location or install it somewhere else and set the path in the `MYSQLCLIENT_CONNECTOR` environment variable before installing. One other slight change was to add additional install and library directories for mariadbclient. This is because the pre-built connector binaries install the needed files in `include` and `lib` whereas building from source (like this repo's workflow does) leaves them in `include/mariadb` and `lib/mariadb`.
- Loading branch information
Showing
3 changed files
with
67 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters