Skip to content
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

Installation through setup.py or easy_install causes the version to be unknown #80

Closed
bwagnerr opened this issue Nov 11, 2014 · 3 comments

Comments

@bwagnerr
Copy link
Contributor

I am bumping into this problem often, what I've seen is that when you install python-gnupg module through easy_install (as setup.py does), it falls into the gnupg._version.versions_from_parentdir function with the IN_LONG_VERSION_PY = True

That means it tries to match the parentdir_prefix with "python-gnupg-" when in reality the parent directory (tested on debian and mac) is named in the following way: "gnupg-1.3.2-py2.7.egg". As it can't match the prefix with the actual directory name, it gets the default version "unknown".

I managed to get it working by changing the parentdir_prefix pattern to "gnupg-", but I am cautious about the other uses this might have.

I can make a pull request about this if you want or think is a good idea.

@isislovecruft
Copy link
Owner

@bwgpro Hello! Thanks for looking into this. It's been broken for me too, and I didn't have the time to debug it. With your patch, would the version number still be correct if installed with pip or a distro package manager? (I'm willing to fix the setup.py version number case only if it doesn't affect the more commonly used installation methods.)

@isislovecruft
Copy link
Owner

I think this is fixed (as of version 1.3.3).

It turns out that the versioneer parameters in setup.py were different than ones given in gnupg/_version.py (and thus imported into the compiled package when not downloaded via a package manager).

@bwgpro Thanks for filing this issue.

Reminder to my future self: We need to check that this is still working okay for version numbers baked into downloads from PyPI and other package managers after uploading packages for python-gnupg-1.3.3.

@bwagnerr
Copy link
Contributor Author

Just in time! I tried with the latest master and couldn't get it to work, should it be the last develop?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants