John Vandenberg has submitted this change and it was merged.
Change subject: Test extras dependencies in setup.py ......................................................................
Test extras dependencies in setup.py
When PYSETUP_TEST_EXTRAS is not enabled, do not install and test rcstream. These tests were always run to maximise testing after the initial merge. It appears stable now.
When PYSETUP_TEST_EXTRAS is enabled, install and test all extra dependencies, including rcstream and pydot.
Disable installation of pYsearch and oursql on py3+. Tests have not been written for these dependencies.
Change-Id: I2306e7d4e1f523c1b7cb05a948975d48609ec424 --- M .travis.yml M setup.py 2 files changed, 16 insertions(+), 8 deletions(-)
Approvals: John Vandenberg: Looks good to me, but someone else must approve XZise: Looks good to me, approved jenkins-bot: Verified
diff --git a/.travis.yml b/.travis.yml index 998878d..561ecde 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,7 @@ addons: apt: packages: + - graphviz - liblua5.1-0-dev
install: diff --git a/setup.py b/setup.py index df6f08a..0691588 100644 --- a/setup.py +++ b/setup.py @@ -21,8 +21,6 @@ # Core library dependencies 'isbn': ['python-stdnum'], 'Graphviz': ['pydot>=1.0.28'], - 'MySQL': ['oursql'], - 'Yahoo': ['pYsearch'], 'Google': ['google'], 'IRC': [irc_dep], 'mwparserfromhell': ['mwparserfromhell>=0.3.3'], @@ -32,8 +30,12 @@ }
if sys.version_info[0] == 2: - # csv is used by wikistats and script data_ingestion - extra_deps['csv'] = ['unicodecsv'] + # Additional core library dependencies which are only available on Python 2 + extra_deps.update({ + 'csv': ['unicodecsv'], + 'MySQL': ['oursql'], + 'Yahoo': ['pYsearch'], + })
script_deps = { 'flickrripper.py': ['Pillow'], @@ -86,6 +88,8 @@ # Other backports are likely broken. dependencies.append('ipaddress')
+ script_deps['data_ingestion.py'] = extra_deps['csv'] + # mwlib is not available for py3 script_deps['patrol'] = ['mwlib']
@@ -116,17 +120,20 @@
extra_deps.update(script_deps)
-# Add all script dependencies as test dependencies, +# Add all dependencies as test dependencies, # so all scripts can be compiled for script_tests, etc. if 'PYSETUP_TEST_EXTRAS' in os.environ: - test_deps += list(itertools.chain(*(script_deps.values()))) + test_deps += list(itertools.chain(*(extra_deps.values()))) + # mwlib requires 'pyparsing>=1.4.11,<1.6', which conflicts with + # pydot's requirement for pyparsing>=2.0.1. + if 'mwlib' in test_deps: + test_deps.remove('mwlib')
-# These extra dependencies enable some tests to run on all builds +# These extra dependencies are needed other unittest fails to load tests. if sys.version_info[0] == 2: test_deps += extra_deps['csv'] else: test_deps += ['six'] -test_deps += extra_deps['rcstream']
# late import of setuptools due to monkey-patching above from ez_setup import use_setuptools
pywikibot-commits@lists.wikimedia.org