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

Version doesn't include git commit hash when installed via "pip3 install ." #2547

Closed
gvanrossum opened this issue Dec 9, 2016 · 2 comments
Closed

Comments

@gvanrossum
Copy link
Member

When running mypy directly out of the git repo, the version (reported by -V or --version) includes the git commit hash. It would be nice if it was also included when mypy was installed directly from the repo, e.g. using pip3 install . or perhaps via pip3 install git+git://github.com/python/mypy.git. However we should make sure that when we actually build a distribution file, that file only includes the base version. (Or perhaps only/exactly when the HEAD revision matches a tag whose name matches the base version?)

(See also PR #2452.)

@gvanrossum
Copy link
Member Author

Note that the version is especially important for -i mode, since the cache cannot be trusted when a different version is installed.

Also note that installing from a git-labeled version should not show the commit hash but installing from something intermediate should always show the commit hash. Or something like that. The idea is that when we build a distribution and push it to PyPI it should not have the commit hash in the version but when we install locally (e.g. using pip3 install -U .) the commit hash should be included.

@pkch
Copy link
Contributor

pkch commented Mar 13, 2017

To clarify, as of right now:

  • pip install -e . (or just setting PYTHONPATH to point at mypy) includes commit hash
  • python setup.py bdist_wheel does not include commit hash

We want to keep the above unchanged.

We want this to happen:

  • pip install /local/repo, and pip install git+git://github.com/python/mypy.git should also include commit hash
  • building the wheel should complain if version hard coded in version.py doesn't match the HEAD commit tag

Correct?

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

3 participants