Skip to content

Commit 2d7bad2

Browse files
authored
Merge pull request #1 from readworks/pr_250
Apply upstream's PR clips#250 to "development" branch
2 parents 17f2154 + 9b74459 commit 2d7bad2

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ before_install:
1111
# Define TZ as some tests rely on timezone
1212
- export TZ=Europe/Brussels
1313
- pip install --quiet pytest==4.4 pytest-cov pytest-xdist chardet
14+
- pip install ".[mysql]"
1415

1516
install:
1617
- python setup.py install --quiet

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ If you have pip, you can automatically download and install from the [PyPI repos
5757
pip install pattern
5858
```
5959

60+
If you wish to use MySQL support, install specifying the optional extra
61+
requirement:
62+
```
63+
pip install pattern[mysql]
64+
```
65+
6066
If none of the above works, you can make Python aware of the module in three ways:
6167
- Put the pattern folder in the same folder as your script.
6268
- Put the pattern folder in the standard location for modules so it is available to all scripts:

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@
137137
install_requires = [
138138
"future",
139139
"backports.csv",
140-
"mysqlclient",
141140
"beautifulsoup4",
142141
"lxml",
143142
"feedparser",
@@ -149,5 +148,8 @@
149148
"cherrypy" if sys.version >= "3" else "cherrypy==17.4.1",
150149
"requests"
151150
],
151+
extras_require = {
152+
'mysql': ["mysqlclient"],
153+
},
152154
zip_safe = False
153155
)

0 commit comments

Comments
 (0)