Skip to content

Wheels on pypi do not contain static version #17

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

Closed
ttreptow opened this issue Jan 30, 2018 · 2 comments
Closed

Wheels on pypi do not contain static version #17

ttreptow opened this issue Jan 30, 2018 · 2 comments
Labels

Comments

@ttreptow
Copy link

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

@pkittenis
Copy link
Member

Hi there,

Thanks for the interest.

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.

Thank you for the reproducible report.

@ttreptow
Copy link
Author

Thanks for the quick response!

Red-M pushed a commit to Red-M/ssh2-python that referenced this issue Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants