Commit 16961b7
Fix version when using source tarballs (triton-lang#7164)
In tarballs there is not git information and `git` would check every
parent folder potentially returning unrelated information.
Verify that `setup.py` is run from a git checkout and bail out
otherwise.
The existence of the `.git` folder should be a good enough indicator for
that.
# New contributor declaration
- [x] I am not making a trivial change, such as fixing a typo in a
comment.
- [x] I have written a PR description following these
[rules](https://cbea.ms/git-commit/#why-not-how).
- [x] I have run `pre-commit run --from-ref origin/main --to-ref HEAD`.
- Select one of the following.
- [x] This PR does not need a test because it changes the setup.py file
only
- Select one of the following.
- [x] I have not added any `lit` tests.
---------
Co-authored-by: peterbell10 <[email protected]>1 parent 05adafe commit 16961b7
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
756 | 756 | | |
757 | 757 | | |
758 | 758 | | |
| 759 | + | |
| 760 | + | |
759 | 761 | | |
760 | 762 | | |
761 | 763 | | |
| |||
0 commit comments