Bug 5884 - 4.6 fails to install in msys2
Summary: 4.6 fails to install in msys2
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 4.6
Hardware: PC Linux
: wish feature
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-11 21:18 UTC by Mike Hommey
Modified: 2018-06-14 00:00 UTC (History)
4 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Hommey 2018-05-11 21:18 UTC
It fails with:

  Running setup.py (path:c:/users/ta2291~1/appdata/local/temp/pip-build-_zfnyo/mercurial/setup.py) egg_info for package mercurial
    Running command python setup.py egg_info
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:/users/ta2291~1/appdata/local/temp/pip-build-_zfnyo/mercurial/setup.py", line 910, in <module>
        extmodules.append(setup_zstd.get_c_extension(name='mercurial.zstd'))
      File "contrib/python-zstandard/setup_zstd.py", line 128, in get_c_extension
        compiler.compiler_type)
    Exception: unhandled compiler type: mingw32
Comment 1 Dmitry Sokolov 2018-05-14 09:34 UTC
I am also seeing this error.

Looks like

contrib/python-zstandard/setup_zstd.py

    if compiler.compiler_type == 'unix':
        compiler_type = 'unix'
    elif compiler.compiler_type == 'msvc':
        compiler_type = 'msvc'
    else:
        raise Exception('unhandled compiler type: %s' %
                        compiler.compiler_type)


does not handle other compiler types.
Comment 2 Augie Fackler 2018-05-19 22:18 UTC
As a workaround, you can disable zstandard support for now with --no-zstd.

Adding Greg for zstandard bug.
Comment 3 Mike Hommey 2018-05-19 22:56 UTC
I should have mentioned here that I filed this upstream already: https://github.com/indygreg/python-zstandard/issues/46
Comment 4 Mike Hommey 2018-06-05 03:20 UTC
This was fixed in python-zstandard 0.9.1. Greg, I guess you want to update the vendored python-zstandard?
Comment 5 HG Bot 2018-06-06 13:25 UTC
Fixed by https://mercurial-scm.org/repo/hg/rev/c0081d3e1598
Gregory Szorc <gregory.szorc@gmail.com>
zstandard: pull in bug fixes from upstream 0.9.1 release (issue5884)

This changeset contains the meaningful code changes from
python-zstandard's 0.9.1 release. The main fix is to restore
support for compiling with mingw.

(please test the fix)
Comment 6 Mike Hommey 2018-06-06 20:59 UTC
This works, but is only fixed on the stable branch, not default.
Comment 7 Bugzilla 2018-06-14 00:00 UTC
Bug was set to TESTING for 7 days, resolving