New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_wbemcli.py only works on windows with windows.bat #733
Comments
I did some testing, and think it may be related to a mis-built wheel archive. Please double check which pywbem package and scripts you are invoking:
Also, which version of pywbem did you use. While investigating this, I found out how the hashbang lines of scripts are treated by the build and install process: When the wheel archive is built, the hashbang line of the scripts we supply (those listed in the
I checked all versions of the pywbem wheel archives we have on Pypi, and here are the hashbang lines of the three scripts that are "adjusted" during the build:
Before 0.9.0, we did not build wheel archives. When the wheel archive is installed, the hashbang line of the scripts is again adjusted if it was This install adjustment also happens when a package is installed as an egg (e.g. when installing from the source archive with I verified that our current (0.11.0-dev) wheel build (on CygWin) produces the Bottom line:
|
On trying to reproduce the bad hashbang line: I found this stackoverflow article that suggests it may be a bug in wheel. I was not able to reproduce the incorrect hashbang with the steps described in one of the answers in that article, with my current setup. At the time we released 0.10.0, the Travis CI logs show these versions for python 2.7 (that's where I usually do the upload to Pypi): Python 2.7.12 Currently, these versions are in my cygwin env for python 2.7: Python 2.7.13 By going back to the older versions for pip and setuptools, I was also not able to reproduce it. |
Again on trying to reproduce the issue, a comment in pybuilder/pybuilder#168 suggests that the reason for their incorrect hashbang in the wheel archive was that the script with the incorrect line existed in the build directory ( It seems that we should clean the build subtree before we build for releasing. |
Another issue that may be related, this time in a virtualenv: pypa/virtualenv#845 |
And another one: pypa/setuptools#994 |
The hashbang issue should be addressed now, so Karl please reproduce the original error on Windows and update this issue. |
Discussion point: I believe that some of the changes in PR #857 and #865 (on top of that) may actually be fixes to this. @KSchopmeyer Karl, please verify with PR #865 whether |
Action Karl: retest. |
Discussion point: Do we still want to address this? Answer: Yes. Karl to re-test. |
We still have an an issue. Using the latest document I can install pywbem into a cygwin environment but when I try to use wbemcli.bat I get an error. Using pywbemcli directly works. mock (2.0.0) Python 3.6.4 (default, Jan 7 2018, 15:53:53) Wbemcli interactive shell now exiting InteractiveConsole... TEST WITH wbemcli.bat that fails The bat file in installed in the proper directory: `` (pywbem3) ~/dev/pywbem/pywbemtest$ lt /cygdrive/c/labs/virtualenvs/pywbem3/bin/wbemcli* START and RUN of wbemcli.py (pywbem3) ~/dev/pywbem/pywbemtest$ wbemcli http://sheldon Python 3.6.4 (default, Jan 7 2018, 15:53:53) Wbemcli interactive shell now exiting InteractiveConsole... (pywbem3) ~/dev/pywbem/pywbemtest$ which wbemcli The head of the wbemcli.py file has the following: (pywbem3) ~/dev/pywbem/pywbemtest$ head /cygdrive/c/labs/virtualenvs/pywbem3/bin/wbemcli.py -- coding: utf-8 --(C) Copyright 2008 Hewlett-Packard Development Company, L.P. |
Output of make develop that fails at building lxml, etc. `` kschopmeyer@win7642 pywbem ** make sure the development packages of libxml2 and libxslt are installed ** Using build configuration of libxslt Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed? error: command 'gcc' failed with exit status 1 Failed building wheel for lxml Configure: Autodetecting ZMQ settings... error: command 'gcc' failed with exit status 1 Failed with default libzmq, trying again with /usr/local Configure: Autodetecting ZMQ settings... error: command 'gcc' failed with exit status 1 Warning: Couldn't find an acceptable libzmq on the system. If you expected pyzmq to link against an installed libzmq, please check to make sure:
You can skip all this detection/waiting nonsense if you know
I will now try to build libzmq as a Python extension 1... Using bundled libzmq staging platform.hpp from: buildutils/include_linux checking for timer_create building 'zmq.libzmq' extension Failed building wheel for pyzmq
Command "/cygdrive/c/labs/virtualenvs/pywbem27/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-QZhkIb/lxml/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-DlFDNd-record/install-record.txt --single-version-externally-managed --compile --install-headers /cygdrive/c/labs/virtualenvs/pywbem27/include/site/python2.7/lxml" failed with error code 1 in /tmp/pip-build-QZhkIb/lxml/ |
In a CygWin environment, you need certain packages for installing pywbem (python dev, openssl dev, swig, gcc) and some more for development (libxml2, libxslt, xmllint). In my installation, I seem to have these packages. If you can find out which packages they are, please post it here. Also, note that the installation for native Windows and for UNIX-like environments in Windows (e.g. CygWin) is different. That has been clarified in the documentation in PR #1084. Also, when you want to test a fresh install, make sure that the pip cache directory is removed:
|
Karl reports this as fixed, probably by PR #865. Closing this as fixed. |
For some reason, on windows with cygwin, when the test_wbemcli.py tests is run calling wbemcli directly it produces and error saying that it cannot find the app wbemcli. When wbemcli .bat is used, the script works.
Andy suggested that we may have an issue with pathing so we need to investigate that.
The text was updated successfully, but these errors were encountered: