Skip to content

Wheels on pypi do not contain static version #17

Closed
@ttreptow

Description

@ttreptow

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:

  1. Install ssh2_python-0.6.0-cp27-cp27m-manylinux1_x86_64.whl (newer versions have same problem also)
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions