classification
Title: python-snappy install issue during Crossbar install with Python 3.7.3 (Windows x86 executable installer)
Type: behavior Stage: resolved
Components: Versions: Python 3.7
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: SilentGhost, telatoa
Priority: normal Keywords:

Created on 2019-04-09 09:47 by telatoa, last changed 2019-04-16 07:10 by SilentGhost. This issue is now closed.

Messages (2)
msg339721 - (view) Author: Slim (telatoa) Date: 2019-04-09 09:47
In a Windows 2016 VM, when trying to install Crossbar in offline mode, we observed the following error:

error Running setup.py install for python-snappy ... error
...
snappy/snappymodule.cc(31): fatal error C1083: Cannot open include file: 'snappy-c.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.20.27508\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2

Here the steps to reproduce this issue:
0) In a Windows 10 machine (where we create our MSI):
-> we download the corresponding python-3.7.3.exe (Windows x86 executable installer)
-> we download pyWin32 & crossbar & pip in a specific folder:
    pip download -d "C:\Crossbar373" PyWin32==224
    pip download -d "C:\Crossbar373" crossbar==19.3.5
    pip download -d "C:\Crossbar373" pip==19.0.3

-> python-3.7.3.exe /quiet /layout "C:\Temp\Python373Layout"
-> Our MSI use this folder as an input to install Python 3.7.3 in the target Windows 2016 VM in offline mode

1) In the target Windows 2016 VM (where we launch our MSI):
-> Our MSI install Visual Studio 2019 from https://visualstudio.microsoft.com/downloads/ (default values)
-> It also removes the MAX_PATH Limitation
-> It copies all the files needed to install crossbar in the "C:\Crossbar373" folder
-> Then it executes the following custom actions in this machine:
   a) python-3.7.3.exe /quiet InstallAllUsers=1 TargetDir="C:\Python373x86ExecInstaller" PrependPath=1 Include_pip=0 Include_launcher=0 Include_test=0
   b) python -m pip install --upgrade pip==19.0.3
   c) pip.exe install --no-warn-script-location --disable-pip-version-check --no-index --find-links "C:\Crossbar373" PyWin32==224
   d) pip.exe install --no-warn-script-location --disable-pip-version-check --no-index --find-links "C:\Crossbar373" incremental
   e) pip.exe install --no-warn-script-location --disable-pip-version-check --no-index --find-links "C:\Crossbar373" crossbar
   f) Finally, this issue occurs.

The only workaround found to fix this issue is to:
1) download python_snappy-0.5.4-cp37-cp37m-win32.whl from https://www.lfd.uci.edu/~gohlke/pythonlibs/
2) and install it with our MSI in the target VM before step e):
   pip install C:\Crossbar372\python_snappy-0.5.4-cp37-cp37m-win32.whl

This issue seems also to occur with Python 3.7.2 version.

Questions:
1) Is there any invalid step in our process?
2) Is this workaround validated by you? As this wheel file does not seem to be official.
3) Is this issue related to https://github.com/crossbario/crossbar/issues/1521 one? and thus will be fixed in forthcoming versions?
msg340315 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2019-04-16 07:10
This doesn't seem like a Python issue at all. I would suggest to turn to the crossbario project in the first place, and report it to them if the fix for their 1521 bug does not fix it for you.
History
Date User Action Args
2019-04-16 07:10:41SilentGhostsetstatus: open -> closed

type: compile error -> behavior

nosy: + SilentGhost
messages: + msg340315
resolution: third party
stage: resolved
2019-04-09 09:47:31telatoacreate