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:
parent
c8a09c7949
commit
ea13fd33f7
|
@ -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::
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
python-swiftclient>=1.6.0
|
||||
python-keystoneclient>=0.8.0
|
||||
docutils>=0.8.1
|
||||
mysql-python
|
||||
pymysql
|
||||
pymongo
|
||||
|
||||
[testing]
|
||||
|
|
2
setup.py
2
setup.py
|
@ -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={
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -7,7 +7,7 @@ import multiprocessing
|
|||
import subprocess
|
||||
import time
|
||||
import os
|
||||
import MySQLdb
|
||||
import pymysql as MySQLdb
|
||||
import pymongo
|
||||
import re
|
||||
import pytest
|
||||
|
|
Loading…
Reference in New Issue