Hello PywikibotCommitWatcher,
I'd like you to do a code review. Please visit
https://gerrit.wikimedia.org/r/76317
to review the following change.
Change subject: bug fix; solve bug introduced by r11524 and reported by totoazero and xqt ......................................................................
bug fix; solve bug introduced by r11524 and reported by totoazero and xqt
Change-Id: I30c0efab5cb2c3dfc0cb574792e7a17a5a00e2a3 --- M externals/__init__.py 1 file changed, 15 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/17/76317/1
diff --git a/externals/__init__.py b/externals/__init__.py index dfd4f20..7b18c26 100644 --- a/externals/__init__.py +++ b/externals/__init__.py @@ -279,14 +279,21 @@ return False else: files = dependency_dictionary[distro] - if files and show_question(files): - callable_ = globals()[distro.replace('-', '_') + '_install'] + func = distro.replace('-', '_') + '_install' + if files and (func in globals()) and show_question(files): + callable_ = globals()[func] return callable_(files) else: return False
+def sunos_install(dependency_dictionary): + lowlevel_warning(u'Not implemented yet, download mode will be used.') + return False # skip this in order to trigger 'download_install' next + + def windows_install(dependency_dictionary): + lowlevel_warning(u'Not available in windows OS, download mode will be used.') return False # skip this in order to trigger 'download_install' next
### END of VisTrails inspired and copied code ### ### ### ### ### ### ### ### @@ -373,11 +380,15 @@ return
# install the missing module - dist = guess_system().split(u'-') - if globals()[dist[0] + '_install'](modules_needed[m][0]): + dist = guess_system() + func = dist.split(u'-')[0] + '_install' + lowlevel_warning(u'Trying to install by use of "%s" package management system:' % dist) + if (func in globals()) and globals()[func](modules_needed[m][0]): return + lowlevel_warning(u'Trying to install by download from source URL:') if download_install(modules_needed[m][1], m, path): return + lowlevel_warning(u'Trying to install by use of mercurial:') if (len(modules_needed[m]) > 2) and\ mercurial_repo_install(modules_needed[m][2], m, path): return
jenkins-bot has posted comments on this change.
Change subject: Externals: add support for other platforms than windows/linux ......................................................................
Patch Set 2: Verified+2
Build succeeded.
This change was unable to be automatically merged with the current state of the repository. Please rebase your change and upload a new patchset.
Hello jenkins-bot,
I'd like you to reexamine a change. Please visit
https://gerrit.wikimedia.org/r/76317
to look at the new patch set (#3).
Change subject: bug fix; solve bug introduced by r11524 and reported by totoazero and xqt ......................................................................
bug fix; solve bug introduced by r11524 and reported by totoazero and xqt
Change-Id: I30c0efab5cb2c3dfc0cb574792e7a17a5a00e2a3 --- M externals/__init__.py 1 file changed, 15 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/17/76317/3
jenkins-bot has posted comments on this change.
Change subject: bug fix; solve bug introduced by r11524 and reported by totoazero and xqt ......................................................................
Patch Set 3: Verified+2
Build succeeded.
- https://integration.wikimedia.org/ci/job/pywikibot-compat-pep8/12/console : FAILURE in 3s (non-voting) - https://integration.wikimedia.org/ci/job/pywikibot-compat-pyflakes/10/consol... : FAILURE in 3s (non-voting)
jenkins-bot has posted comments on this change.
Change subject: bug fix; solve bug introduced by r11524 and reported by totoazero and xqt ......................................................................
Patch Set 4: Verified+2
Build succeeded.
- https://integration.wikimedia.org/ci/job/pywikibot-compat-pep8/13/console : FAILURE in 3s (non-voting) - https://integration.wikimedia.org/ci/job/pywikibot-compat-pyflakes/11/consol... : FAILURE in 3s (non-voting)
DrTrigon has posted comments on this change.
Change subject: bug fix; solve bug introduced by r11524 and reported by totoazero and xqt ......................................................................
Patch Set 4: Verified+1 Code-Review+1
DrTrigon has posted comments on this change.
Change subject: bug fix; solve bug introduced by r11524 and reported by totoazero and xqt ......................................................................
Patch Set 4: Verified+2 Code-Review+2
I will aprove this since the slow thransition from svn to git should not negatively affect patch deploy. Additionally there was not vote against this change.
DrTrigon has submitted this change and it was merged.
Change subject: bug fix; solve bug introduced by r11524 and reported by totoazero and xqt ......................................................................
bug fix; solve bug introduced by r11524 and reported by totoazero and xqt
Externals: add support for other platforms than windows/linux - Any OS without explicit support will now trigger download_install - SunOS now has explicit non-support (i.e. a function that will trigger download_install)
Change-Id: I30c0efab5cb2c3dfc0cb574792e7a17a5a00e2a3 --- M externals/__init__.py 1 file changed, 15 insertions(+), 4 deletions(-)
Approvals: DrTrigon: Verified; Looks good to me, approved jenkins-bot: Verified
diff --git a/externals/__init__.py b/externals/__init__.py index 89baed3..97a193e 100644 --- a/externals/__init__.py +++ b/externals/__init__.py @@ -282,14 +282,21 @@ return False else: files = dependency_dictionary[distro] - if files and show_question(files): - callable_ = globals()[distro.replace('-', '_') + '_install'] + func = distro.replace('-', '_') + '_install' + if files and (func in globals()) and show_question(files): + callable_ = globals()[func] return callable_(files) else: return False
+def sunos_install(dependency_dictionary): + lowlevel_warning(u'Not implemented yet, download mode will be used.') + return False # skip this in order to trigger 'download_install' next + + def windows_install(dependency_dictionary): + lowlevel_warning(u'Not available in windows OS, download mode will be used.') return False # skip this in order to trigger 'download_install' next
### END of VisTrails inspired and copied code ### ### ### ### ### ### ### ### @@ -376,11 +383,15 @@ return
# install the missing module - dist = guess_system().split(u'-') - if globals()[dist[0] + '_install'](modules_needed[m][0]): + dist = guess_system() + func = dist.split(u'-')[0] + '_install' + lowlevel_warning(u'Trying to install by use of "%s" package management system:' % dist) + if (func in globals()) and globals()[func](modules_needed[m][0]): return + lowlevel_warning(u'Trying to install by download from source URL:') if download_install(modules_needed[m][1], m, path): return + lowlevel_warning(u'Trying to install by use of mercurial:') if (len(modules_needed[m]) > 2) and\ mercurial_repo_install(modules_needed[m][2], m, path): return
jenkins-bot has posted comments on this change.
Change subject: bug fix; solve bug introduced by r11524 and reported by totoazero and xqt ......................................................................
Patch Set 4:
Starting gate-and-submit jobs. https://integration.wikimedia.org/zuul/
jenkins-bot has posted comments on this change.
Change subject: bug fix; solve bug introduced by r11524 and reported by totoazero and xqt ......................................................................
Patch Set 4:
Build succeeded.
- https://integration.wikimedia.org/ci/job/pywikibot-compat-pep8/14/console : FAILURE in 13s (non-voting) - https://integration.wikimedia.org/ci/job/pywikibot-compat-pyflakes/12/consol... : FAILURE in 12s (non-voting)
Xqt has posted comments on this change.
Change subject: bug fix; solve bug introduced by r11524 and reported by totoazero and xqt ......................................................................
Patch Set 4:
There is a remaining bug. Try the following e.g. from idle:
import Wikipedia
you are asked to install patch.exe. If you decline this request you are asked a second time. If declined a second time the script raises a fatal error while importing beautifullsoup. Beautifullsoup is a central part if the screen scraping compat framework and we should not prohibit using the framework for a cosmetic patch. Please give us back that part as e.gm externals or a library script. Anyway it is not a good idea to ask for installation (twice) and fall into a fatal error if you answer is NO. There should be alternatives to patching the working copy (e.g. nightly dump etc.)
pywikibot-commits@lists.wikimedia.org