Skip to content

Commit 97ae35b

Browse files
committed
Move coverage and flake dependencies into own setup.py area
1 parent bd49164 commit 97ae35b

File tree

2 files changed

+29
-12
lines changed

2 files changed

+29
-12
lines changed

requirements.txt

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ py==1.10.0;python_version>="3.5"
3333
pytest==4.6.11;python_version<"3.5"
3434
pytest==6.1.2;python_version>="3.5" and python_version<"3.6"
3535
pytest==6.2.2;python_version>="3.6"
36-
pytest-cov==2.11.1
3736
pytest-forked==1.3.0
3837
pytest-html==1.22.1;python_version<"3.6"
3938
pytest-html==2.0.1;python_version>="3.6"
@@ -70,7 +69,6 @@ importlib-metadata==2.0.0;python_version<"3.6"
7069
virtualenv>=20.4.2
7170
pymysql==0.10.1;python_version<"3.6"
7271
pymysql==1.0.2;python_version>="3.6"
73-
coverage==5.5
7472
brython==3.9.1
7573
pyotp==2.6.0
7674
boto==2.49.0
@@ -80,13 +78,21 @@ Pillow==6.2.2;python_version<"3.5"
8078
Pillow==7.2.0;python_version>="3.5" and python_version<"3.6"
8179
Pillow==8.1.2;python_version>="3.6"
8280
rich==9.13.0;python_version>="3.6" and python_version<"4.0"
83-
flake8==3.7.9;python_version<"3.5"
84-
flake8==3.8.4;python_version>="3.5"
85-
pyflakes==2.1.1;python_version<"3.5"
86-
pyflakes==2.2.0;python_version>="3.5"
8781
tornado==5.1.1;python_version<"3.5"
8882
tornado==6.1;python_version>="3.5"
8983
allure-pytest==2.8.22;python_version<"3.5"
9084
allure-pytest==2.8.36;python_version>="3.5"
9185
pdfminer.six==20191110;python_version<"3.5"
9286
pdfminer.six==20201018;python_version>="3.5"
87+
88+
# --- Testing Requirements --- #
89+
# ("pip install -r requirements.txt" also installs this, but "pip install -e ." won't.)
90+
91+
coverage==5.5
92+
pytest-cov==2.11.1
93+
flake8==3.7.9;python_version<"3.5"
94+
flake8==3.8.4;python_version>="3.5"
95+
pyflakes==2.1.1;python_version<"3.5"
96+
pyflakes==2.2.0;python_version>="3.5"
97+
pycodestyle==2.5.0;python_version<"3.5"
98+
pycodestyle==2.6.0;python_version>="3.5"

setup.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
'>>> Confirm release PUBLISH to PyPI? (yes/no): ')).lower().strip()
3838
if reply == 'yes':
3939
print("\n*** Checking code health with flake8:\n")
40+
os.system("python -m pip install 'flake8==3.8.4'")
4041
flake8_status = os.system("flake8 --exclude=temp")
4142
if flake8_status != 0:
4243
print("\nWARNING! Fix flake8 issues before publishing to PyPI!\n")
@@ -137,7 +138,6 @@
137138
'pytest==4.6.11;python_version<"3.5"',
138139
'pytest==6.1.2;python_version>="3.5" and python_version<"3.6"',
139140
'pytest==6.2.2;python_version>="3.6"',
140-
'pytest-cov==2.11.1',
141141
'pytest-forked==1.3.0',
142142
'pytest-html==1.22.1;python_version<"3.6"',
143143
'pytest-html==2.0.1;python_version>="3.6"',
@@ -174,7 +174,6 @@
174174
'virtualenv>=20.4.2', # Sync with importlib-metadata and pathlib2
175175
'pymysql==0.10.1;python_version<"3.6"',
176176
'pymysql==1.0.2;python_version>="3.6"',
177-
'coverage==5.5',
178177
'brython==3.9.1',
179178
'pyotp==2.6.0',
180179
'boto==2.49.0',
@@ -184,17 +183,29 @@
184183
'Pillow==7.2.0;python_version>="3.5" and python_version<"3.6"',
185184
'Pillow==8.1.2;python_version>="3.6"',
186185
'rich==9.13.0;python_version>="3.6" and python_version<"4.0"',
187-
'flake8==3.7.9;python_version<"3.5"',
188-
'flake8==3.8.4;python_version>="3.5"',
189-
'pyflakes==2.1.1;python_version<"3.5"',
190-
'pyflakes==2.2.0;python_version>="3.5"',
191186
'tornado==5.1.1;python_version<"3.5"',
192187
'tornado==6.1;python_version>="3.5"',
193188
'allure-pytest==2.8.22;python_version<"3.5"',
194189
'allure-pytest==2.8.36;python_version>="3.5"',
195190
'pdfminer.six==20191110;python_version<"3.5"',
196191
'pdfminer.six==20201018;python_version>="3.5"',
197192
],
193+
extras_require={
194+
# pip install -e .[coverage]
195+
'coverage': [
196+
'coverage==5.5',
197+
'pytest-cov==2.11.1',
198+
],
199+
# pip install -e .[flake]
200+
'flake': [
201+
'flake8==3.7.9;python_version<"3.5"',
202+
'flake8==3.8.4;python_version>="3.5"',
203+
'pyflakes==2.1.1;python_version<"3.5"',
204+
'pyflakes==2.2.0;python_version>="3.5"',
205+
'pycodestyle==2.5.0;python_version<"3.5"',
206+
'pycodestyle==2.6.0;python_version>="3.5"',
207+
],
208+
},
198209
packages=[
199210
'seleniumbase',
200211
'seleniumbase.common',

0 commit comments

Comments
 (0)