mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-16 22:10:26 +00:00
Support building wheel from sdist
Build hook is also called for the wheel since:
38dea6b7 ("Fix install with pip git+https", 2022-09-13)
This commit is contained in:
parent
a0eb6d5187
commit
ef2d571761
1 changed files with 6 additions and 3 deletions
|
|
@ -41,9 +41,12 @@ class CustomBuildHook(BuildHookInterface):
|
|||
committer_date = committer_year = "unknown"
|
||||
try:
|
||||
cp = subprocess.run(["git", "log", "-n 1", "HEAD", "--format=%cs"],
|
||||
capture_output=True, text=True)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
capture_output=True, check=True, text=True)
|
||||
except (FileNotFoundError, subprocess.CalledProcessError):
|
||||
# support building wheel from sdist
|
||||
if Path(*RELEASE_PY).is_file():
|
||||
self.app.display_warning("_release.py already exists")
|
||||
return
|
||||
else:
|
||||
if cp and cp.stdout:
|
||||
committer_date = cp.stdout.strip()
|
||||
|
|
|
|||
Loading…
Reference in a new issue