Page MenuHomePhabricator

Windows users get error: Unable to find vcvarsall.bat when using setup.py due to mwparserfromhell
Closed, ResolvedPublic

Description

See https://github.com/earwig/mwparserfromhell#installation and https://github.com/earwig/mwparserfromhell/issues/68

It was added as a dependency in Iaa77c0f7e0f7885f08c90581bde86c2c2aa88720.


Version: core-(2.0)
Severity: normal
OS: Windows 7
See Also:
https://github.com/earwig/mwparserfromhell/issues/68

Details

Reference
bz66010

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:22 AM
bzimport set Reference to bz66010.
bzimport added a subscriber: Unknown Object (????).

My email to the list about this http://lists.wikimedia.org/pipermail/pywikipedia-l/2014-June/008778.html

I suggested that we don't specify mwparserfromhell as a dependency for Windows users as a temporary solution.

Change 136702 had a related patch set uploaded by Legoktm:
Only set mwparserfromhell as a dependency for non-Windows users

https://gerrit.wikimedia.org/r/136702

Change 136702 merged by jenkins-bot:
Only set mwparserfromhell as a dependency for non-Windows users

https://gerrit.wikimedia.org/r/136702

Reopened: A solution for Windows user should be done.

Installing mwparserfromhell using pip2.7 works for me on 32 bit Windows, with and without its C parser enabled.

The pip installation looked nothing like https://github.com/earwig/mwparserfromhell/issues/68 (it doesnt try to compile anything), so I presume that they have rebuild/redistributed mwparserfromhell 0.3.3 with the dll due to the changes/recommendations by valhallasw.

It looks like this issue is solved, and when mwparserfromhell 0.4 is released we should re-add the dependency for MS Windows.

jayvdb set Security to None.
jayvdb moved this task from Backlog to Upstream issues on the Pywikibot board.
jayvdb removed a subscriber: Unknown Object (????).

pypi has the following binary packages in addition to the 0.3.3 source tarball.
mwparserfromhell-0.3.3-cp26-none-win32.whl
mwparserfromhell-0.3.3-cp27-none-win32.whl
mwparserfromhell-0.3.3-cp32-none-win32.whl

As we now support py3, we also need binary packages for cp33 and cp34 (I believe one binary package for all py3+ should be possible, but I've only had a cursory glance at tokenizer.c and the outstanding issues), or its setup.py could be fixed so that it doesnt compile unless the compiler is present, so that it falls back to the pure python version (this is https://github.com/earwig/mwparserfromhell/issues/26 ; it is closed, but I'll work on a patch for this).

However, their current tests fail on py3.3

https://github.com/earwig/mwparserfromhell/issues/78

And a less useful report of problems on py3.4

https://github.com/earwig/mwparserfromhell/issues/71

pypi has the following binary packages in addition to the 0.3.3 source tarball.
mwparserfromhell-0.3.3-cp26-none-win32.whl
mwparserfromhell-0.3.3-cp27-none-win32.whl
mwparserfromhell-0.3.3-cp32-none-win32.whl

As we now support py3, we also need binary packages for cp33 and cp34 (I believe one binary package for all py3+ should be possible, but I've only had a cursory glance at tokenizer.c and the outstanding issues), or its setup.py could be fixed so that it doesnt compile unless the compiler is present, so that it falls back to the pure python version (this is https://github.com/earwig/mwparserfromhell/issues/26 ; it is closed, but I'll work on a patch for this).

A quick hack...

https://github.com/jayvdb/mwparserfromhell/commit/c0e9c7c68ce25db935e84a3e099c8f0227726772

Only tested on py2.6 on Linux without Python.h , so needs more testing before a pull request.

mwparserfromhell 4.0 has been released.
https://pypi.python.org/pypi/mwparserfromhell/0.4
So far, ... there are no wheels/binary packages available for the 0.4 package. However this shouldnt be necessary due to pure python mode, but we need to test that on windows -- my Appveyor builds does not install extras (https://ci.appveyor.com/project/jayvdb/pywikibot-core/build/1.0.i18n_fixup2.195/job/qnp4jbp9u5ifrvm7).

There is one mwparserfromhell bug causing our builds to break. If it isnt fixed quickly in mwparserfromhell, we can workaround it by removing the 3.5 builds :/
https://github.com/earwig/mwparserfromhell/issues/101

mwparserfromhell 0.4.1 should come soon (next few days, just need to work out the windows binary situation) - I'll add 3.5 support along with it, so we shouldn't have any problems with this.

jayvdb claimed this task.

mwparserfromhell 0.4.1 should come soon (next few days, just need to work out the windows binary situation) - I'll add 3.5 support along with it, so we shouldn't have any problems with this.

That didnt happen, so we removed mwparserfromhell tests from our py3.5 builds.
Anyway, the original problem doesnt occur any longer.
And our Appveyor builds now test installing extras like mwparserfromhell, so we'll notice any future breakages.
https://ci.appveyor.com/project/jayvdb/pywikibot-core/build/1.0.win32-skip-oursql.298/job/l9weku4fwpe9b77q