How can I know which commit was used when installing a pip package from git?

Viewed 2068
4 Answers

I can easily find the commit hash for a package of mine.

I've used Cookie Cutter tool to generate my python package structure. When I install my package from a GitLab repository, a directory named <package-name>-<version>.dist-info is generated inside my Python Lib directory.

There's a file direct_url.json that records the commit_id of the repository: Install info

I don't really know if this a general solution when a install from a git repo is made, or an artifact generated by the Cookie Cutter setup.

Related