You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When importing the package I get an error. It looks like it is calling some git commands and trying to create a version. Looking into the code, I think it is supposed to do this only when it is built and replace _version.py with a static version getter.
The windows wheels seem to have the static file, but the linux ones do not (at least the python 2.7 ones I looked at).
Bug reports
Steps to reproduce:
Install ssh2_python-0.6.0-cp27-cp27m-manylinux1_x86_64.whl (newer versions have same problem also)
look at /ssh2/_version.py
from ssh2.session import Session
path-to-site-packages/ssh2/init.py:2: in version = get_versions()['version']
path-to-site-packages/ssh2/_version.py:507: in get_versions
pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose)
path-to-site-packages/ssh2/_version.py:298: in git_pieces_from_vcs
pieces["distance"] = int(count_out) # total number of commits
TypeError: int() argument must be a string or a number, not 'NoneType'
Expected behaviour:
_version.py contains static version, does not require git to be installed
Actual behaviour:
_version.py makes calls to git when ssh2 is imported
Additional info:
Version 0.6.0
Platform: Centos 6
Python version: 2.7.14
The text was updated successfully, but these errors were encountered:
Indeed, can reproduce. It seems to be an issue with versioneer and extension modules not having a static version built for wheels. Impacts both OSX and linux wheels.
Not present on windows wheels because their static version is being created manually by this project for other unrelated reasons so versioneer was never creating that file on windows.
It has been fixed in this project's copy of versioneer, with an upstream PR to come.
Directions
When importing the package I get an error. It looks like it is calling some git commands and trying to create a version. Looking into the code, I think it is supposed to do this only when it is built and replace _version.py with a static version getter.
The windows wheels seem to have the static file, but the linux ones do not (at least the python 2.7 ones I looked at).
Bug reports
Steps to reproduce:
Expected behaviour:
_version.py contains static version, does not require git to be installed
Actual behaviour:
_version.py makes calls to git when ssh2 is imported
Additional info:
Version 0.6.0
Platform: Centos 6
Python version: 2.7.14
The text was updated successfully, but these errors were encountered: