diff --git a/.travis.yml b/.travis.yml index c6a4d3f7..4e055fbb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ before_install: - conda update --yes conda - conda install --yes numpy scipy - pip install --quiet pytest pytest-cov pytest-xdist chardet + - pip install ".[mysql]" install: - python setup.py install --quiet diff --git a/README.md b/README.md index 98a117d5..0efec9a2 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,12 @@ If you have pip, you can automatically download and install from the [PyPI repos pip install pattern ``` +If you wish to use MySQL support, install specifying the optional extra +requirement: +``` +pip install pattern[mysql] +``` + If none of the above works, you can make Python aware of the module in three ways: - Put the pattern folder in the same folder as your script. - Put the pattern folder in the standard location for modules so it is available to all scripts: diff --git a/setup.py b/setup.py index 6b1a8866..92bf5ca5 100644 --- a/setup.py +++ b/setup.py @@ -137,7 +137,6 @@ install_requires = [ "future", "backports.csv", - "mysqlclient", "beautifulsoup4", "lxml", "feedparser", @@ -149,5 +148,8 @@ "cherrypy", "requests" ], + extras_require = { + 'mysql': ["mysqlclient"], + }, zip_safe = False )