Use Python module MyMySQL instead of MySQLdb

There are issues porting to Windows when MySQLdb
C files have to be compiled. New library is
100% Python and 100% compatible.

LAUNCHPAD: https://blueprints.launchpad.net/freezer/+spec/windows-testing

Change-Id: Ic863bd231eaca5a891df61741df5e2ba6433ba4e
This commit is contained in:
Zahari Zahariev 2015-01-28 16:14:37 +00:00
parent c8a09c7949
commit ea13fd33f7
7 changed files with 9 additions and 8 deletions

View File

@ -30,7 +30,7 @@ Requirements
- python-swiftclient
- python-keystoneclient
- pymongo
- python-mysqldb
- PyMySQL
- libmysqlclient-dev
- At least 128 MB of memory reserved for Freezer
@ -53,7 +53,7 @@ MongoDB backup::
MySQL backup::
$ sudo apt-get install -y python-mysqldb libmysqlclient-dev
$ sudo pip install pymysql
Freezer installation from Python package repo::

View File

@ -43,9 +43,9 @@ def backup_mode_mysql(backup_opt_dict, time_stamp, manifest_meta_dict):
"""
try:
import MySQLdb
import pymysql as MySQLdb
except ImportError:
raise ImportError('please install MySQLdb module')
raise ImportError('Please install PyMySQL module')
if not backup_opt_dict.mysql_conf_file:
raise ValueError('MySQL: please provide a valid config file')

View File

@ -1,7 +1,7 @@
python-swiftclient>=1.6.0
python-keystoneclient>=0.8.0
docutils>=0.8.1
mysql-python
pymysql
pymongo
[testing]

View File

@ -80,7 +80,7 @@ setup(
install_requires=[
'python-swiftclient>=1.6.0',
'python-keystoneclient>=0.7.0',
'mysql-python',
'pymysql',
'pymongo',
'docutils>=0.8.1'],
extras_require={

View File

@ -7,7 +7,7 @@ import multiprocessing
import subprocess
import time
import os
import MySQLdb
import pymysql as MySQLdb
import pymongo
import re
from collections import OrderedDict

View File

@ -7,7 +7,7 @@ import multiprocessing
import subprocess
import time
import os
import MySQLdb
import pymysql as MySQLdb
import pymongo
import re
import pytest

View File

@ -10,6 +10,7 @@ deps =
flake8
pytest-cov
pytest-xdist
pymysql
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}